Click or drag to resize

ProtocolSocketOpen Method

Opens (or reopens) the socket.

Namespace:  Demo3D.Net
Assembly:  Demo3D.IO (in Demo3D.IO.dll) Version: 10.0.0.0 (10.0.0.0)
Syntax
C#
public void Open()
Examples
C#
public Client<IPacketIOService> OpenClient(string host, int port) {
    // Create a connection to a client, without opening it.
    var client = TcpClient.Open(host, port, openConnection: false);

    // Get the protocol properties and set TCP.ReceiveTimeout to 1 second.
    dynamic properties            = client.Properties;
    properties.TCP.ReceiveTimeout = 1000;

    // Open the connection.
    client.Open();

    return client;
}
See Also