TipcSrvSubjectSetSubscribeEx start or stop subscribing to a subject using extended options
T_BOOL TipcSrvSubjectSetSubscribeEx(subj_name
,status
,type
,flags
,type_specific_struct
) T_STRsubj_name
; T_BOOLstatus
; T_INT4type
; T_INT4flags
; T_PTRtype_specific_struct
;
subj_name
name of the subject to set subscribe status for
status
subscribe status (TRUE
to subscribe or FALSE
to unsubscribe)
type
type of subscribe to use (T_SUBJ_NONE
for a normal subscribe or T_SUBJ_CACHE
to enable the SmartSockets Cache interface)
flags
describe the attribute of type
type_specific_struct
used to pass any additional information needed by a type
TRUE
if the subscribe status of the subject was successfully set, FALSE
otherwise.
If TipcSrvSubjectSetSubscribeEx fails, it returns FALSE
and sets the global SmartSockets error number to one of:
TipcSrvSubjectSetSubscribeEx is used to subscribe to a subject using extended options. Currently the only option available is caching.
If type
is T_SUBJ_NONE
, flags
must be set to zero (0
).
If type
is T_SUBJ_CACHE
, flags
must be one of:
If type is either T_SUBJ_NONE
or T_SUBJ_CACHE
, type_specific_struct
must be set to T_NULL
.
None
None
This example retrieves a message from SmartSockets Cache:
/* Retrieve message from Cache */
TutOut("Retrieving messages from Cache ...\n"); TipcSrvSubjectSetSubscribeEx( "/SCache/*",/* requested subject */
T_TRUE,/* true to subscribe */
T_SUBJ_CACHE,/* type of subscribe */
T_SUBJ_FLAG_SC_INITIAL_LOAD,/* attribute type to last value */
T_NULL);/* as using T_SUBJ_CACHE */
TIBCO SmartSockets™ Application Programming Interface Software Release 6.8, July 2006 Copyright © TIBCO Software Inc. All rights reserved www.tibco.com |