예제 #1
0
        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);
                }
            }
        }
예제 #2
0
 public void Send(WebsocketPacket packet)
 {
     lock (sendLock)
         if (packet.Compose())
         {
             sock.Send(packet.Data);
         }
 }