Esempio n. 1
0
 /// <summary>
 /// 该Socket连接是否能被接受
 /// </summary>
 /// <param name="socket"></param>
 /// <returns></returns>
 private bool CanAcceptSocket(Socket socket)
 {
     try
     {
         var args = new SocketFilterEventArgs(socket);
         SocketAccepted(this, args); // 触发Socket连接是否能被接受事件通知
         return(args.IsSocketOk);
     }
     catch (Exception err)
     {
         Logger.Error("SocketAccepted trigger exception: " + err);
         return(true);
     }
 }
Esempio n. 2
0
 /// <summary>
 /// 该Socket连接是否能被接受
 /// </summary>
 /// <param name="socket"></param>
 /// <returns></returns>
 private bool CanAcceptSocket(Socket socket)
 {
   try
   {
     var args = new SocketFilterEventArgs(socket);
     SocketAccepted(this, args); // 触发Socket连接是否能被接受事件通知
     return args.IsSocketOk;
   }
   catch (Exception err)
   {
     Logger.Error("SocketAccepted trigger exception: " + err);
     return true;
   }
 }