Beispiel #1
0
 private void SendData()
 {
     if (socket == null || !socket.Connected)
     {
         Close();
         return;
     }
     else
     {
         SendPacket p;
         while ((p = packetPool.GetSendPacket()) != null)
         {
             byte[] msg = messagePacker.Write(p);
             if (msg != null)
             {
                 socket.Send(msg);
             }
         }
     }
 }