Example #1
0
 private void Update()
 {
     if (TCPSocket.IsConnect())
     {
         //发送数据
         if (0 == Time.frameCount % SendInterval && 0 < SendQueue.Count)
         {
             TCPSocket.Send(SendQueue.Dequeue());
         }
         if (0 == Time.frameCount % RecvInterval)
         {
             onReceive();
         }
     }
 }