Click or drag to resize

RuntimeManagerClientDisconnected Event

Occurs when the client was disconnected.

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 event ClientDisconnectedHandler ClientDisconnected

Value

Type: OpenTestSystem.Otx.Runtime.Api.EventClientDisconnectedHandler

Implements

IRuntimeManagerClientDisconnected
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");
        rt.ClientDisconnected += new OpenTestSystem.Otx.Runtime.Api.Event.ClientDisconnectedHandler(ClientDisconnected);
        rt.Connect("192.168.1.30", 1001);
        rt.Disconnect();
    } 

    private static void ClientDisconnected(string hostIpAddress, string hostName)
    {
        Console.WriteLine(string.Format("Disconnected from {0} ({1}).", hostIpAddress, hostName));         
    }
}
See Also