TipcConnReadCbLookup look up a read callback in a connection
T_CB TipcConnReadCbLookup(conn
,mt
,func
,arg
) T_IPC_CONNconn
; T_IPC_MTmt
; T_IPC_CONN_READ_CB_FUNCfunc
; T_CB_ARGarg
;
conn
connection to look up callback for
mt
message type to look up callback for (null means global callback)
func
callback function
arg
user-defined argument
Callback if successful, NULL
otherwise.
If TipcConnReadCbLookup fails, it returns NULL
and sets the global SmartSockets error number to one of:
TipcConnReadCbLookup looks up a connection read callback with the desired message type, function, and argument in a connection. These callbacks are called when a new message is received from the connection’s socket, which occurs in TipcConnRead. See TipcConnReadCbCreate for more information on connection read callbacks.
None
TipcConnReadCbCreate; see the TIBCO SmartSockets Utilities for information on TutCbDestroy.
This example looks up a NUMERIC_DATA connection read callback and a global connection read callback:
mt = TipcMtLookupByNum(T_MT_NUMERIC_DATA); if (mt == NULL) {return
; /* error */
} cb = TipcConnReadCbLookup(conn, mt, my_conn_read_cb, NULL); if (cb == NULL) {
return
; /* error */
}/* global connection read callback */
cb = TipcConnReadCbLookup(conn, NULL, my_global_read_cb, NULL); if (cb == NULL) {
return
; /* error */
}
TIBCO SmartSockets™ Application Programming Interface Software Release 6.8, July 2006 Copyright © TIBCO Software Inc. All rights reserved www.tibco.com |