Пример #1
0
 public void SendData(byte[] data)
 {
     if (ReadyState.Equals(WebSocketState.Open))
     {
         Send(data);
         Console.WriteLine(string.Format("sent: {0}", BitConverter.ToString(data)));
     }
 }
Пример #2
0
 public void SendData(string data)
 {
     if (ReadyState.Equals(WebSocketState.Open))
     {
         Send(data);
         Console.WriteLine(String.Format("sent: {0}", BitConverter.ToString(Encoding.UTF8.GetBytes(data))));
     }
 }