TipcSrvMonClientVersionPoll poll once for RTclient version information
srv
connection handle to RTserver
client_name
name of RTclient to poll (wildcard names allowed, or use T_IPC_MON_ALL to indicate a poll of all RTclients matching the value of Monitor_Scope)
TRUE
if the poll was successfully initiated, FALSE
otherwise.
If TipcSrvMonClientVersionPoll fails, it returns FALSE
and sets the global SmartSockets error number to one of:
TipcSrvMonClientVersionPoll polls for RTclient version information by sending a MON_CLIENT_VERSION_POLL_CALL message to the client_name
RTclient. The client_name
argument can be the unique subject name of a single RTclient, a wildcarded subject name to match many RTclients, or T_IPC_MON_ALL to poll all RTclients in the project that match the value of the Monitor_Scope option. The polled RTclient responds by sending back a MON_CLIENT_VERSION_POLL_RESULT message. The response may or may not come back quickly, depending on what the polled RTclient is doing. The polling RTclient can use functions such as TipcSrvConnMsgSearchType or TipcSrvConnMainLoop to get the response.
Each MON_CLIENT_VERSION_POLL_RESULT message contains two fields:
There are multiple responses only if client_name
is a wildcard or T_IPC_MON_ALL.
TipcSrvMonClientVersionPoll sends a MON_CLIENT_VERSION_POLL_CALL message to RTserver, but does not explicitly flush the message. See TipcSrvConnGetAutoFlushSize for more information on message buffering.
There is no response message if the RTclient named client_name
does not exist; the poll is silently dropped.
RTclient version information can be polled, but it cannot be watched.
TipcMonClientVersionPoll, TipcMonServerVersionPoll
This example uses TipcSrvMonClientVersionPoll to poll for version information in all RTclients, creates a callback to process the incoming MON_CLIENT_VERSION_POLL_RESULT messages, and then waits up to 10 seconds for the poll results:
void T_ENTRY ClientVersionCb(conn, data, arg) T_IPC_CONN conn; T_IPC_CONN_PROCESS_CB_DATA data; T_CB_ARG arg; { T_STR client_name; T_INT4 version; TipcMsgNextStr(data->msg, &client_name); TipcMsgNextInt4(data->msg, &version); TutOut("%s: %d\n", client_name, version); } /* ClientVersionCb */ /* ... code from calling function is below */ T_IPC_MT mt; mt = TipcMtLookupByNum(T_MT_MON_CLIENT_VERSION_POLL_RESULT); if (mt == NULL) {return
; /* error */
} if (TipcSrvConnProcessCbCreate( srv, mt, ClientVersionCb, NULL) == NULL) {return
; /* error */
} TipcSrvMonClientVersionPoll(srv, "/..."); TipcSrvConnFlush(srv); if (!TipcSrvConnMainLoop(srv, 10.0)) {return
; /* error */
}
TIBCO SmartSockets™ Application Programming Interface Software Release 6.8, July 2006 Copyright © TIBCO Software Inc. All rights reserved www.tibco.com |