TipcCbSrvProcessControl callback to process CONTROL messages from RTserver
void TipcCbSrvProcessControl(conn
,data
,arg
) T_IPC_CONNconn
; T_IPC_CONN_PROCESS_CB_DATAdata
; T_CB_ARGarg
;
conn
connection to RTserver
data
callback data
arg
callback argument (not used)
None
If TipcCbSrvProcessControl cannot parse the CONTROL message, it outputs a warning message with TutWarning and then calls TipcMsgPrintError.
TipcCbSrvProcessControl processes a CONTROL message that is received from RTserver. This callback function uses the value of the option Enable_Control_Msgs to check if the command is enabled, and if allowed, it calls TutCommandParseStr with the one string field of the message. TipcSrvCreate calls TipcSrvProcessCbCreate to create a process callback with message type CONTROL, function TipcCbSrvProcessControl, and argument NULL
.
TipcCbSrvProcessControl is not meant to be called directly and should only be used as a callback function.
TipcSrvCreate, TipcSrvProcessCbCreate; see the TIBCO SmartSockets Utilities for information on TutCommandParseStr.
This example creates a connection to RTserver, looks up the callback that uses TipcCbSrvProcessControl, and destroys the callback so that CONTROL messages are ignored:
T_IPC_MT mt; T_CB cb; if (!TipcSrvCreate(T_IPC_SRV_CONN_FULL)) {
return
; /* error */
} mt = TipcMtLookupByNum(T_MT_CONTROL); if (mt == NULL) {
return
; /* error */
} cb = TipcSrvProcessCbLookup(mt, TipcCbSrvProcessControl, 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 |