disconnect


Name

disconnect — disconnect from RTserver

Synopsis

Supported for RTserver:

disconnect 
disconnect server_name 
disconnect server_conn_name 

Supported for RTclient and RTmon:

disconnect 
disconnect full 

Description

The disconnect command disconnects the process from an RTserver (if it is connected). The process no longer receives any messages from that RTserver until the connect command is issued again. For an RTserver process, it is part of a group of interconnected RTserver processes as long as it is connected to other RTservers. When it disconnects, it is still considered part of a group of one.

For RTclient and RTmon processes, if disconnect is called without an argument, the process keeps a warm connection to RTserver so that the process can later reconnect to that RTserver and still receive and watch the same subjects. The disconnect full command fully disconnects the process from that RTserver. The process can then continue as if it had never been connected to that RTserver. The disconnect command uses the function TipcSrvDestroy to destroy the connection to that RTserver. For more information on disconnecting from RTserver, see Destroying the Connection to RTserver.

For RTserver processes calling disconnect, if it is called without any arguments, the RTserver process disconnects from all RTservers to which it is connected. If disconnect is called with the name of an RTserver, the RTserver process disconnects from that specific RTserver. If disconnect is called with a logical connection name, the RTserver process disconnects from the RTserver that it connected to using that specific logical connection name.

An RTclient process must call the API function TipcInitCommands to enable access to the disconnect 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.

When using the disconnect command with an RTserver process, note that it does nothing if that RTserver process is not connected to other RTservers.

The disconnect 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 disconnect 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

connect

Examples

Here is an example of disconnecting from an RTserver:

PROMPT> disconnect 
Disconnecting (warm) from RTserver. 
/* Reconnect and continue. */ 
PROMPT> connect 
Attempting to reconnect to RTserver. 
Connecting to project <rtworks> on <_node> RTserver. 
Using local protocol. 
Message from RTserver: Connection established. 
Start subscribing to subject </_workstation_13060> again. 
/* Fully disconnect from RTserver. */ 
PROMPT> disconnect full 
Disconnecting (full) from RTserver. 

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