Esempio n. 1
0
 private void Send(object o)
 {
     try
     {
         while (used)
         {
             if (SendBaseNetObjects.Count > 0)
             {
                 BaseNetObject baseNetObject = SendBaseNetObjects.Dequeue();
                 NetBaseTool.SendBaseNetObject(socket, baseNetObject);
             }
             Thread.Sleep(DELAY);
         }
     }
     catch (SocketException e)
     {
         if (t != null)
         {
             t.Stop();
         }
         Logger.WriteException(e, "心跳中断");
         used = false;
         return;
     }
 }