CONN_REGISTER_SERVER_PROTOCOL(3)

FUNCTION
conn_register_server_protocol - Register server protocol support.

SYNOPSIS
#include <karma_conn.h>

void conn_register_server_protocol

( CONST char *protocol_name, unsigned int version, unsigned int max_connections, flag (*open_func) (), flag (*read_func) (), void (*close_func) () )

DESCRIPTION
This routine will register the support of a new Karma protocol for the Karma ports which are being managed by the various routines in the <-conn-> package. This routine may be called at any time.

protocol_name
    The name of the new protocol to support. Note that this is only for incoming connections.

version
    The version number for the protocol. When any changes to the protocol are made, this should be increased.

max_connections
    The maximum number of incoming connections to this server If this is 0, an unlimited number of connections is permitted.

open_func
    The routine which is called when a new connection is opened. The prototype function is <-conn_PROTO_open_func->.

read_func
    The function which will be called when data is ready to be read data from the connection. The prototype function is <-conn_PROTO_read_func->.

close_func
    The function which will be called prior to closure of a connection. The prototype function is <-conn_PROTO_close_func->.

RETURN VALUE
Nothing.

Multi-threading Level
Unsafe.

AUTHOR
Richard Gooch (rgooch@atnf.csiro.au)

AVAILABLITY
The Karma Distribution is available for anonymous ftp from: ftp://ftp.atnf.csiro.au/pub/software/karma/ ftp://wuarchive.wustl.edu/graphics/graphics/packages/karma/ ftp://ftp.pwr.wroc.pl/pub/karma/ The Karma Home Page is: http://www.atnf.csiro.au/karma/