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