TipcConnQueueCbLookup


Name

TipcConnQueueCbLookup — look up a queue callback in a connection

Synopsis

T_CB TipcConnQueueCbLookup(conn, mt, func, arg) 
T_IPC_CONN conn; 
T_IPC_MT mt; 
T_IPC_CONN_QUEUE_CB_FUNC func; 
T_CB_ARG arg; 

Arguments

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

Return Values

Callback if successful, NULL otherwise.

Diagnostics

If TipcConnQueueCbLookup fails, it returns NULL and sets the global SmartSockets error number to one of:

Description

TipcConnQueueCbLookup looks up a connection queue callback with the desired message type, function, and argument in a connection. These callbacks are called when a message is inserted into or deleted from a connection’s queue of incoming messages. See TipcConnQueueCbCreate for more information on connection queue callbacks.

Caution

None

See Also

TipcConnQueueCbCreate; see the TIBCO SmartSockets Utilities for information on TutCbDestroy.

Examples

This example looks up a NUMERIC_DATA connection queue callback and a global connection queue callback:

mt = TipcMtLookupByNum(T_MT_NUMERIC_DATA); 
if (mt == NULL) { 
  return;  /* error */ 
}  
 
cb = TipcConnQueueCbLookup(conn, mt, my_conn_queue_cb, NULL); 
if (cb == NULL) { 
  return;  /* error */ 
}  
/* global connection queue callback */ 
cb = TipcConnQueueCbLookup(conn, NULL, my_global_queue_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