TipcSrvStdSubjectSetSubscribe


Name

TipcSrvStdSubjectSetSubscribe — start or stop subscribing to all standard subjects

Synopsis

T_BOOL TipcSrvStdSubjectSetSubscribe(subscribe_status, time_status) 
T_BOOL subscribe_status; 
T_BOOL time_status; 

Arguments

subscribe_status — whether to start or stop subscribing to all standard subjects

time_status — whether or not to include _time subject

Return Values

TRUE if the subscribe statuses of the standard subjects were successfully set, FALSE otherwise.

Diagnostics

If TipcSrvStdSubjectSetSubscribe fails, it returns FALSE and sets the global SmartSockets error number to one of:

Description

TipcSrvStdSubjectSetSubscribe sets the subscribe statuses of the standard subjects by calling TipcSrvSubjectSetSubscribe for each standard subject. TipcSrvStdSubjectSetSubscribe 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, TipcSrvStdSubjectSetSubscribe prints out an informational message with TutOut. TipcSrvStdSubjectSetSubscribe also flushes the retrieval messages with TipcSrvFlush when it is done.

TipcSrvStdSubjectSetSubscribe may attempt to automatically create a connection to RTserver. If RTclient has a warm connection to RTserver, TipcSrvStdSubjectSetSubscribe changes the subscribe statuses of the subjects as if the RTclient were still connected to RTserver. See TipcSrvCreate on automatic creation of connections and warm connections to RTserver.

Caution

None

See Also

TipcSrvSubjectSetSubscribe

Examples

This example sets the option Subjects and uses TipcSrvStdSubjectSetSubscribe to start subscribing to the standard subjects:

TutCommandParseStr("setopt subjects subject1, subject2"); 
if (!TipcSrvStdSubjectSetSubscribe(TRUE, TRUE)) { 
  return;  /* error */ 
}  

The output from the above fragment would be similar to:

Start subscribing to subject </_time>. 
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