TipcSrvConnSubjectGetSubscribe determine if an RTclient is subscribing to a subject
T_BOOL TipcSrvConnSubjectGetSubscribe(srv
,subject
,subscribe_status_return
) T_IPC_SRVsrv
; T_STRsubject
; T_BOOL *subscribe_status_return
;
srv
connection handle to RTserver
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 TipcSrvConnSubjectGetSubscribe fails, it returns FALSE
and sets the global SmartSockets error number to one of:
TipcSrvConnSubjectGetSubscribe determines 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 TipcSrvConnSubjectSetSubscribe. To find out if an RTclient is subscribing to a subject, including load balancing information, use TipcSrvConnSubjectGetSubscribeLb.
TipcSrvConnSubjectGetSubscribe may attempt to automatically create a connection to RTserver. TipcSrvConnSubjectGetSubscribe gets the subscribe status of the subject for both full and warm RTclient connections. See TipcSrvConnOpen for more information on automatic creation of connections and warm connections to RTserver.
If TipcSrvConnSubjectGetSubscribe returns FALSE
, it does not store a value in subscribe_status_return
.
TipcMonClientSubscribeSetWatch, TipcMonSubjectSubscribeSetWatch, TipcSrvConnSubjectSetSubscribe, TipcSrvConnSubjectGetSubscribeLb
This example gets the subscribe status of the subject /system/thermal
:
T_BOOL subscribe_status; if (!TipcSrvConnSubjectGetSubscribe(srv, "/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 |