CONN_REGISTER_CLIENT_PROTOCOL(3)

FUNCTION
conn_register_client_protocol - Register client protocol support.

SYNOPSIS
#include <karma_conn.h>

void conn_register_client_protocol

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

DESCRIPTION
This routine will register the support of a new Karma protocol for outgoing (client) connections. This routine may be called at any time.

protocol_name
    The name of the new protocol to support. Note that this is only for outgoing 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 outgoing connections from this client. If this is 0, an unlimited number of connections is permitted.

validate_func
    The function which will validate the opening of a new connection (prior to any attempts to connect to the server). The prototype function is <-conn_PROTO_client_validate_func->.

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/