Click or drag to resize

CotpClientOpen Method (String, String, Flags, Int32)

Open an ISO COTP connection.

Namespace:  Demo3D.Net.Protocols
Assembly:  Demo3D.IO (in Demo3D.IO.dll) Version: 15.0.2.11458
Syntax
C#
public static Client<IPacketIOService> Open(
	string host,
	string tsap,
	Flags flags = default,
	int port = -1
)

Parameters

host
Type: SystemString
The host to connect to.
tsap
Type: SystemString
The destination TSAP.
flags (Optional)
Type: Demo3D.NetFlags
Connection flags.
port (Optional)
Type: SystemInt32
ISO port number.

Return Value

Type: ClientIPacketIOService
A new COTP client.
Examples
C#
public void SendMessage(string host, string tsap) {
    // Open a connection to a client.
    var client = CotpClient.Open(host, tsap);

    // Send a message.
    var message = BinaryTextEncoding.NullTerminatedASCII.GetBytes("hello");
    client.IO.Write(message);

    // Close the connection.
    client.Close();
}
See Also