Exemple #1
0
 internal void CloseFree()
 {
     ReceiveBuffer.Free();
     ReceiveBigBuffer.TryFree();
     if (CheckTimer != null)
     {
         CheckTimer.Free(this);
         ClientCheckTimer.FreeNotNull(CheckTimer);
         CheckTimer = null;
     }
     FreeReceiveDeSerializer();
     if (Sender != null)
     {
         Sender.Close();
     }
 }
Exemple #2
0
 /// <summary>
 /// 验证函数调用
 /// </summary>
 /// <param name="client"></param>
 /// <returns></returns>
 protected bool verifyMethod(ClientBase client)
 {
     if (isVerifyMethod = client.SocketVerifyMethod(Sender))
     {
         if (client.Attribute.GetCheckSeconds > 0 && CheckTimer == null)
         {
             CheckTimer = ClientCheckTimer.Get(client.Attribute.GetCheckSeconds);
             if (client.IsDisposed == 0)
             {
                 CheckTimer.Push(this);
             }
             else
             {
                 ClientCheckTimer.Free(ref CheckTimer);
                 return(false);
             }
         }
         return(true);
     }
     return(false);
 }