TipcSrvMonSubjectNamesGetWatch


Name

TipcSrvMonSubjectNamesGetWatch — determine if this RTclient is watching subject names

Synopsis

T_BOOL TipcSrvMonSubjectNamesGetWatch(srv, watch_status_return) 
T_IPC_SRV srv; 
T_BOOL *watch_status_return; 

Arguments

srv — connection handle to RTserver

watch_status_return — storage for watch status

Return Values

TRUE if the subject names watch status was successfully retrieved, FALSE otherwise.

Diagnostics

If TipcSrvMonSubjectNamesGetWatch fails, it returns FALSE and sets the global SmartSockets error number to:

Description

TipcSrvMonSubjectNamesGetWatch determines whether this RTclient is watching the subject names in the current project that match the value of the Monitor_Scope option. The watch status controls whether the RTclient receives a MON_SUBJECT_NAMES_STATUS message each time a subject is created or destroyed. A subject is considered created when the first RTclient starts subscribing to that subject. A subject is considered destroyed when the last RTclient stops subscribing to that subject.

Each MON_SUBJECT_NAMES_STATUS message contains three fields:

Use TipcSrvMonSubjectNamesSetWatch to set whether this RTclient is watching subject names. To poll once for subject names, use TipcSrvMonSubjectNamesPoll.

Caution

If TipcSrvMonSubjectNamesGetWatch returns FALSE, it does not store a value in watch_status_return.

See Also

TipcSrvMonSubjectNamesPoll, TipcSrvMonSubjectNamesSetWatch

Examples

This uses TipcSrvMonSubjectNamesGetWatch to get the status of watching subject names:

T_BOOL watch_status; 
if (!TipcSrvMonSubjectNamesGetWatch(srv, &watch_status)) { 
  return;  /* error */ 
} 
TutOut("This process is %s subject names.\n", 
       watch_status ? "watching" : "not watching"); 

TIBCO SmartSockets™ Application Programming Interface
Software Release 6.8, July 2006
Copyright © TIBCO Software Inc. All rights reserved
www.tibco.com