TipcMonServerVersionPoll poll once for RTserver version information
server_name
name of RTserver to poll (wildcard names allowed, or use T_IPC_MON_ALL to indicate a poll of all RTservers matching the value of Monitor_Scope)
TRUE
if the poll was successfully initiated, FALSE
otherwise.
If TipcMonServerVersionPoll fails, it returns FALSE
and sets the global SmartSockets error number to one of:
TipcMonServerVersionPoll polls for RTserver version information by sending a MON_SERVER_VERSION_POLL_CALL message to the server_name
RTserver. The server_name
argument can be the unique subject name of a single RTserver, a wildcarded subject name to match many RTservers, or T_IPC_MON_ALL to poll all RTservers that match the value of the Monitor_Scope option. The polled RTserver responds by sending back a MON_SERVER_VERSION_POLL_RESULT message. The polling RTclient can use functions such as TipcSrvMsgSearchType or TipcSrvMainLoop to get the response.
Each MON_SERVER_VERSION_POLL_RESULT message contains two fields:
There are multiple responses only if server_name
is a wildcard or T_IPC_MON_ALL.
TipcMonServerVersionPoll sends a MON_SERVER_VERSION_POLL_CALL message to RTserver, but does not explicitly flush the message. See TipcSrvGetAutoFlushSize for more information on message buffering.
There is no response message if the RTserver named server_name
does not exist; the poll is silently dropped.
RTserver version information can be polled, but it cannot be watched.
This example uses TipcMonServerVersionPoll to poll for version information in all RTservers, creates a callback to process the incoming MON_SERVER_VERSION_POLL_RESULT messages, then waits up to 10 seconds for the poll results:
void T_ENTRY ServerVersionCb(conn, data, arg) T_IPC_CONN conn; T_IPC_CONN_PROCESS_CB_DATA data; T_CB_ARG arg; { T_STR server_name; T_INT4 version; TipcMsgNextStr(data->msg, &server_name); TipcMsgNextInt4(data->msg, &version); TutOut("%s: %d\n", server_name, version); } /* ServerVersionCb */ /* ... code from calling function is below */ T_IPC_MT mt; mt = TipcMtLookupByNum(T_MT_MON_SERVER_VERSION_POLL_RESULT); if (mt == NULL) { return;/* error */
} if (TipcSrvProcessCbCreate(mt, ServerVersionCb, NULL) == NULL) { return;/* error */
} TipcMonServerVersionPoll("/..."); TipcSrvFlush(); if (!TipcSrvMainLoop(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 |