Click or drag to resize

RuntimeManagerCheckConnection Method

Checks if the client connected to a host.

Namespace:  OpenTestSystem.Otx.Runtime.Api
Assembly:  OpenTestSystem.Otx.Runtime.Api (in OpenTestSystem.Otx.Runtime.Api.dll) Version: 5.5.0.0 (6.1.0.31040)
Syntax
public ConnectionStates CheckConnection()

Return Value

Type: ConnectionStates
A connection state.

Implements

IRuntimeManagerCheckConnection
Examples
The following example shows how you can use this event to inform that the client was disconnected from the host.
C#
static class Program
{
    static void Main()
    { 
        RuntimeManager rt = new RuntimeManager();
        rt.Load("C:\\Sample.ptx");
        Console.WriteLine("Connection state is " + rt.CheckConnection().ToString());//NotConnected.
        rt.Connect("192.168.1.30", 1001);
        Console.WriteLine("Connection state is " + rt.CheckConnection().ToString());//Connected or Interrupted.
        rt.Disconnect();
        Console.WriteLine("Connection state is " + rt.CheckConnection().ToString());//Disconnected.
    }
}
See Also