TipcSrvConnOpen open a connection to RTserver
srv
the connection to open
create_status
whether to create a warm connection (use T_IPC_SRV_CONN_WARM
) or a full connection (use T_IPC_SRV_CONN_FULL
)
TRUE
if the connection to RTserver was successfully opened, FALSE
otherwise.
If TipcSrvConnOpen fails, it returns FALSE
and sets the global SmartSockets error number to one of:
create_status
was not T_IPC_SRV_CONN_WARM
or T_IPC_SRV_CONN_FULL
TipcSrvConnOpen opens the connection to RTserver. The RTclient becomes part of the project, can subscribe to subjects, can publish (send) messages to RTserver, and receive messages from RTserver. Each project is self-contained; messages cannot be sent between projects. When the connection to RTserver is created, the RTclient immediately starts subscribing to its unique subject. The RTclient can call TipcSrvConnSubjectSetSubscribe to start subscribing to other subjects.
An RTclient can have a warm connection to RTserver, which is a subset of a full connection to RTserver. Most of the other TipcSrvConn functions, such as TipcSrvConnMsgSend, call TipcSrvConnOpen if Server_Auto_Connect is set to TRUE and the RTclient does not have a full connection to RTserver. See TipcSrvConnClose for more information on warm connections to RTserver.
None
TipcSrvConnClose, TipcSrvConnGetConnStatus
This example sets the options Project and Server_Names, then connects to RTserver:
T_IPC_SRV srv; srv = TipcSrvConnCreate(T_NULL, "demo", "tcp:mode", T_NULL); if (!srv) {
return
; /* error */
} if (!TipcSrvConnOpen(srv, T_IPC_SRV_CONN_FULL)) {
return
; /* error */
}
TIBCO SmartSockets™ Application Programming Interface Software Release 6.8, July 2006 Copyright © TIBCO Software Inc. All rights reserved www.tibco.com |