The "chm" Package

These routines are meant to provide a generic and simple to use channel management facility (i.e. event processing on pipes, connections and terminals). A similar set of routines: chx_ provide identical functionality (with the exception of the polling routine), except that they rely on the Xt Intrinsics event dispatching system.

Library: karma
Link With: -lkarma

Functions

chm_manageManage a channel for activity by registering callback routines.
chm_unmanageTerminate the management of a channel for activity.
chm_unmanage_by_handleTerminate the management of a channel for activity.

Prototype Functions

chm_PROTO_input_funcThis routine is called when new input occurs on a channel.
chm_PROTO_close_funcThis routine is called when a channel closes.
chm_PROTO_output_funcThis routine is called when a channel becomes ready for writing.
chm_PROTO_exception_funcThis routine is called when an exception occurs on channel.


Functions


KManagedChannel chm_manage ( Channel channel, void *info, flag (*input_func) (), void (*close_func) (), flag (*output_func) (),flag (*exception_func) () )

Manage a channel for activity by registering callback routines.

Parameters:

Returns: A KManagedChannel object on success, else NULL.
Multithreading Level: Unsafe


void chm_unmanage (Channel channel)

Terminate the management of a channel for activity.

Parameters:

Returns: Nothing.
Multithreading Level: Unsafe
Note:


EXPERIMENTAL FUNCTION: subject to change without notice

void chm_unmanage_by_handle (KManagedChannel mch)

Terminate the management of a channel for activity.

Parameters:

Returns: Nothing.
Multithreading Level: Unsafe
Note:


Prototype Functions


flag chm_PROTO_input_func (Channel channel, void **info)

This routine is called when new input occurs on a channel.

Parameters:

Returns: TRUE if the channel is to remain managed and open, else FALSE (indicating that the channel is to be unmanaged and closed).
Multithreading Level: Unsafe
Note:


void chm_PROTO_close_func (Channel channel, void *info)

This routine is called when a channel closes.

Parameters:

Returns: Nothing.
Multithreading Level: Unsafe
Note:


flag chm_PROTO_output_func (Channel channel, void **info)

This routine is called when a channel becomes ready for writing.

Parameters:

Returns: TRUE if the channel is to remain managed and open, else FALSE (indicating that the channel is to be unmanaged and closed).
Multithreading Level: Unsafe
Note:


flag chm_PROTO_exception_func (Channel channel, void **info)

This routine is called when an exception occurs on channel.

Parameters:

Returns: TRUE if the channel is to remain managed and open, else FALSE (indicating that the channel is to be unmanaged and closed).
Multithreading Level: Unsafe
Note:


Back to Karma Home Page
Contact: Richard Gooch
Web Development: Ariel Internet Services