TipcCbSrvProcessControl


Name

TipcCbSrvProcessControl — callback to process CONTROL messages from RTserver

Synopsis

void TipcCbSrvProcessControl(conn, data, arg) 
T_IPC_CONN conn; 
T_IPC_CONN_PROCESS_CB_DATA data; 
T_CB_ARG arg; 

Arguments

conn — connection to RTserver

data — callback data

arg — callback argument (not used)

Return Values

None

Diagnostics

If TipcCbSrvProcessControl cannot parse the CONTROL message, it outputs a warning message with TutWarning and then calls TipcMsgPrintError.

Description

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.

Caution

TipcCbSrvProcessControl is not meant to be called directly and should only be used as a callback function.

See Also

TipcSrvCreate, TipcSrvProcessCbCreate; see the TIBCO SmartSockets Utilities for information on TutCommandParseStr.

Examples

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