TipcSrvConnStdSubjectSetSubscribe start or stop subscribing to all standard subjects
T_BOOL TipcSrvConnStdSubjectSetSubscribe(srv
,subscribe_status
) T_IPC_SRVsrv
; T_BOOLsubscribe_status
;
srv
connection handle to RTserver
subscribe_status
whether to start or stop subscribing to all standard subjects
TRUE
if the subscribe statuses of the standard subjects were successfully set, FALSE
otherwise.
If TipcSrvConnStdSubjectSetSubscribe fails, it returns FALSE
and sets the global SmartSockets error number to one of:
TipcSrvConnStdSubjectSetSubscribe sets the subscribe statuses of the standard subjects by calling TipcSrvConnSubjectSetSubscribe for each standard subject. TipcSrvConnStdSubjectSetSubscribe is often used to subscribe to subjects listed in a command file. There are many standard subjects:
As each standard subject subscribe status is changed, TipcSrvConnStdSubjectSetSubscribe prints out an informational message with TutOut. TipcSrvConnStdSubjectSetSubscribe also flushes the retrieval messages with TipcSrvConnFlush when it is done.
TipcSrvConnStdSubjectSetSubscribe may attempt to automatically create a connection to RTserver. If RTclient has a warm connection to RTserver, TipcSrvConnStdSubjectSetSubscribe changes the subscribe statuses of the subjects as if the RTclient were still connected to RTserver. See TipcSrvConnOpen for more information on automatic creation of connections and warm connections to RTserver.
None
TipcSrvConnSubjectSetSubscribe
This example sets the option Subjects and uses TipcSrvConnStdSubjectSetSubscribe to start subscribing to the standard subjects:
TutCommandParseStr("setopt subjects subject1, subject2"); if (!TipcSrvConnStdSubjectSetSubscribe(srv, TRUE)) {
return
; /* error */
}
The output from the above fragment would be similar to:
Start subscribing to subject </subject1>. Start subscribing to subject </subject2>. Start subscribing to subject </_workstation1>. Start subscribing to subject </_all>.
TIBCO SmartSockets™ Application Programming Interface Software Release 6.8, July 2006 Copyright © TIBCO Software Inc. All rights reserved www.tibco.com |