TipcSrvConnSubjectSetSubscribe start or stop subscribing to a subject
T_BOOL TipcSrvConnSubjectSetSubscribe(srv
,subject
,subscribe_status
) T_IPC_SRVsrv
; T_STRsubject
; T_BOOLsubscribe_status
;
srv
connection handle to RTserver
subject
name of the subject to set subscribe status for
subscribe_status
subscribe status
TRUE
if the subscribe status of the subject was successfully set, FALSE
otherwise.
If TipcSrvConnSubjectSetSubscribe fails, it returns FALSE
and sets the global SmartSockets error number to one of:
TipcSrvConnSubjectSetSubscribe sets whether or not this RTclient is subscribing to a subject. The subscribe status controls whether or not the RTclient receives messages published (sent) to that subject. If the subscribe status of subject is TRUE, then the RTclient receives messages with subject
as their destination that are sent to RTserver. To determine if an RTclient is subscribing to a subject, use TipcSrvConnSubjectGetSubscribe.
TipcSrvConnSubjectSetSubscribe may attempt to automatically create a connection to RTserver. If RTclient has a warm connection to RTserver, TipcSrvConnSubjectSetSubscribe sets the subscribe status of the subject as if the RTclient were still connected to RTserver. See TipcSrvConnOpen for more information on automatic creation of connections and warm connections to RTserver.
There are a number of standard subjects available to all RTclients. See TipcSrvConnStdSubjectSetSubscribe for more information on these standard subjects.
To determine if an RTclient is subscribing to a subject, with or without load balancing information, use TipcSrvConnSubjectSetSubscribeLb.
TipcSrvConnSubjectSetSubscribe sends a SUBJECT_SET_SUBSCRIBE message to RTserver, but does not explicitly flush the message. See TipcSrvConnGetAutoFlushSize for more information on message buffering.
TipcMonClientSubscribeSetWatch, TipcMonSubjectSubscribeSetWatch, TipcSrvConnSubjectGetSubscribe, TipcSrvConnStdSubjectSetSubscribe, TipcSrvConnSubjectSetSubscribeLb
This example uses TipcSrvConnSubjectSetSubscribe to start subscribing to the subject /system/thermal
:
TIBCO SmartSockets™ Application Programming Interface Software Release 6.8, July 2006 Copyright © TIBCO Software Inc. All rights reserved www.tibco.com |