TipcSrvConnWriteCbLookup


Name

TipcSrvConnWriteCbLookup — look up a write callback in the connection

Synopsis

T_CB TipcSrvConnWriteCbLookup(srv, mt, func, arg) 
T_IPC_SRV srv; 
T_IPC_MT mt; 
T_IPC_CONN_WRITE_CB_FUNC func; 
T_CB_ARG arg; 

Arguments

srv — connection handle to RTserver to look up callback on

mt — message type to look up callback for (null means global callback)

func — callback function

arg — user-defined argument

Return Values

New callback if successful, NULL otherwise.

Diagnostics

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

Description

TipcSrvConnWriteCbLookup looks up a write callback with the desired message type, function, and argument in the connection to RTserver by calling TipcConnWriteCbLookup. These callbacks are called when a message is sent on the connection to RTserver. See TipcConnWriteCbCreate for more information on connection write callbacks.

TipcSrvConnWriteCbLookup may attempt to automatically create a connection to RTserver. If RTclient has a warm connection to RTserver, TipcSrvConnWriteCbLookup looks up a write callback in the warm connection. See TipcSrvConnOpen for more information on automatic creation of connections and warm connections to RTserver.

Caution

None

See Also

TipcConnWriteCbLookup, TipcSrvConnWriteCbCreate; see the TIBCO SmartSockets Utilities for information on TutCbDestroy.

Examples

This example looks up and destroys a NUMERIC_DATA write callback in the connection to RTserver:

T_CB cb; 
T_IPC_MT mt; 
 
mt = TipcMtLookupByNum(T_MT_NUMERIC_DATA); 
if (mt == NULL) { 
  return;  /* error */ 
}  
 
cb = TipcSrvConnWriteCbLookup(srv, mt, my_numeric_write_cb, NULL); 
if (cb == NULL) { 
  return;  /* error */ 
}  
 
if (!TutCbDestroy(cb)) { 
  return;  /* error */ 
}  
 

TIBCO SmartSockets™ Application Programming Interface
Software Release 6.8, July 2006
Copyright © TIBCO Software Inc. All rights reserved
www.tibco.com