connect


Name

connect — connect to RTserver

Synopsis

Supported for RTserver:

connect 
connect server_conn_name 

Supported for RTclient and RTmon:

connect 
connect warm 

Description

The connect command connects the process to an RTserver (if it is not already connected).

For RTclient and RTmon processes, if connect is called without any arguments, then a full global connection to RTserver is created. A full global connection is the normal mode for them to connect to RTserver. The connect warm command creates a warm connection to RTserver. A warm connection is a subset of a full connection, and should normally be used only when an RTserver is temporarily unavailable. The connect command uses the function TipcSrvCreate to create the connection to RTserver. For more information on creating a connection to RTserver, see Creating a Connection to RTserver.

It is possible for the connect command to be received and processed via a CONTROL message, such as:
disconnect; setopt server_names tcp:bar; connect
If this occurs, the command will be applied to the connection on which it was received.

For RTserver processes using connect, it connects RTserver to other RTserver processes (if it is not already connected). A set of interconnected RTserver processes is called a group. When RTserver first starts up, it executes an implicit connect command as part of initialization. If connect is called without any arguments, RTserver traverses the list of logical connection names in the Server_Names option and tries to connect to all RTservers listed there. See Finding Other RTserver Processes. If connect is called with a logical connection name, RTserver connects to another RTserver using that specific logical connection name.

An RTclient process must call the API function TipcInitCommands to enable access to the connect command.

Caution

To prevent irreversible damage to your SmartSockets system, this command should not be specified with the Enable_Control_Msgs option without careful supervision.

For RTserver processes, the connect command does nothing if RTserver is already connected to other RTserver processes.

The connect command cannot be used in any of the rtserver.cm startup command files, as RTserver creates its specific commands (such as connect) after the startup command files have been executed. For RTserver processes, the connect command can be executed using CONTROL messages with a destination of _server.

The connect command acts on the global connection unless received via a CONTROL message, in which case the command is applied to the connection on which it was received.

See Also

disconnect, subscribe, unsubscribe

Examples

Here is an example of connecting to an RTserver:

PROMPT> connect 
Connecting to project <tutorial> on <artimus> RTserver. 
Using local protocol. 
Message from RTserver: Connection established. 
Start subscribing to subject </_workstation_10770>. 

TIBCO SmartSockets™ User’s Guide
Software Release 6.8, July 2006
Copyright © TIBCO Software Inc. All rights reserved
www.tibco.com