EditorClient.Client.Disconnect C# (CSharp) Method

Disconnect() public method

public Disconnect ( ) : void
return void
        public void Disconnect()
        {
            while (IsSending)
                Thread.Sleep(10);
            IsConnected = false;
            if (_stream != null) {
                try {_stream.Close(); }
                catch (Exception ex) { }
            }
            if (_client != null) {
                try { _client.Close(); }
                catch (Exception ex) { }
            }
        }

Usage Example

Exemplo n.º 1
0
 public void Send(string message)
 {
     var client = new Client();
     client.Connect(Port, (s) => {});
     if (!client.IsConnected)
         return;
     client.SendAndWait(message);
     client.Disconnect();
 }
All Usage Examples Of EditorClient.Client::Disconnect