CotpClientOpen Method (String, Byte, Boolean) |
Namespace: Demo3D.Net.Protocols
public static Client<IPacketIOService> Open( string host, byte[] tsap, bool openConnection = true )
public void SendMessage(string host, string tsap) { // Open a connection to a client. var client = CotpClient.Open(host, tsap); // Send a message. using (var packet = client.IO.Write()) { packet.WriteString("hello"); // The message is the string "hello". packet.Flush(); // Send the message. } // Close the connection. client.Close(); }