public void Send(byte[] message) { lock (sendLock) { totalSent += message.Length; //Console.WriteLine("TX " + message.Length +"/"+totalSent);// + " " + DC.ToHex(message, 0, (uint)size)); pkt_send.Message = message; if (pkt_send.Compose()) { sock.Send(pkt_send.Data); } } }
public void Send(WebsocketPacket packet) { lock (sendLock) if (packet.Compose()) { sock.Send(packet.Data); } }