Flynet Viewer .NET Programmer's Reference

disconnect Method

disconnect Method

Previous topic Next topic  

disconnect Method

Previous topic Next topic  

 

Disconnect from the session and drop the link to the host.

 

bool HostConnection.disconnect();

bool HostConnection.disconnect(String option);

 

 

 

Arguments

 

HostConnection

 Required. HostConnection object.

 

option

 Optional. Specify the type of disconnection.

 

Remarks

 

Option values:

"stop"                - Disconnect and stop the session. This the default.

"release"        - Disconnect but do not stop the session. Any process can reconnect to this session. Use this option for pooled session environments. Note that the value of the sessionKey value is no longer valid once a disconnect with the "release" option has been executed.

"reserve"        - Disconnect the from the session but do not stop it. Use a sessionKey to reconnect to the session. The session can only be opened by a connection object running in the same thread process.

"switch"        - Same as "reserve" but used in a shared UI-Terminal Emulation environment to indicate a switch from the UI to the FVTerm

 

If the sessionMonitor property is set to true an option need not be set as it will be forced to reserve.

 

If the HostScreen.recordingName property has been set to the name of a recording file, the HostConnection.disconnect() method will close and convert the recording to include changes.

 

This c# example opens a session and then immediately kills it:

 HostConnection oConn=new HostConnection();

 oConn.hostName = "Insure";

 oConn.connect("standard");

 oConn.disconnect("stop");

 

This example opens 2 connection objects. The first connection object opens a session and then disconnects, leaving the session open (reserved). The second connection object then takes control of the session and closes it:

 

 string sessionKey;

 HostConnection oConn=new HostConnection();

 HostConnection oConn2=new HostConnection();

 oConn.hostName = "Insure";

 oConn.connect("standard");

 sessionKey = oConn.sessionKey;

 oConn.disconnect("reserve");

 

 oConn2.sessionKey = sessionKey;

 oConn2.connect("standard");

 oConn2.disconnect("stop");

 

Requirements

 

Flynet Viewer

 

See Also

 

Connect | sessionMonitor | sessionKey

 

Applies To: HostConnection object

 


© 2016 Inventu Corporation, Flynet LTD