TipcSrvSubjectGetSubscribe determine if an RTclient is subscribing to a subject
T_BOOL TipcSrvSubjectGetSubscribe(subject
,subscribe_status_return
) T_STRsubject
; T_BOOL *subscribe_status_return
;
subject
name of the subject to get subscribe status for
subscribe_status_return
storage for subscribe status
TRUE
if the subscribe status of the subject was successfully retrieved, FALSE
otherwise.
If TipcSrvSubjectGetSubscribe fails, it returns FALSE
and sets the global SmartSockets error number to one of:
TipcSrvSubjectGetSubscribe gets whether an RTclient is subscribing to a subject. The subscribe status controls whether the RTclient receives messages published (sent) to that subject. If the subscribe status of subject
is TRUE
, the RTclient receives messages with subject
as their destination that are sent to RTserver. To start or stop subscribing to a subject, use TipcSrvSubjectSetSubscribe. To find out if an RTclient is subscribing to a subject, including load balancing information, use TipcSrvSubjectGetSubscribeLb.
TipcSrvSubjectGetSubscribe may attempt to automatically create a connection to RTserver. TipcSrvSubjectGetSubscribe gets the subscribe status of the subject for both full and warm RTclient connections. See TipcSrvCreate on automatic creation of connections and warm connections to RTserver.
If TipcSrvSubjectGetSubscribe returns FALSE
, it does not store a value in subscribe_status_return
.
TipcMonClientSubscribeSetWatch, TipcMonSubjectSubscribeSetWatch, TipcSrvSubjectSetSubscribe, TipcSrvSubjectGetSubscribeLb
This example gets the subscribe status of the subject /system/thermal
:
T_BOOL subscribe_status; if (!TipcSrvSubjectGetSubscribe("/system/thermal", &subscribe_status)) {
return
; /* error */
} TutOut("This process is %s the /system/thermal subject.\n", subscribe_status ? "subscribing to" : "not subscribing to");
TIBCO SmartSockets™ Application Programming Interface Software Release 6.8, July 2006 Copyright © TIBCO Software Inc. All rights reserved www.tibco.com |