Exemple #1
0
 private bool OnBeforeAccept(Socket socket)
 {
     if (BeforeAccept != null)
     {
         TcpEventArgs e = new TcpEventArgs(socket);
         BeforeAccept.Invoke(this, e);
         return !e.Cancelled;
     }
     return true;
 }
Exemple #2
0
 private bool OnBeforeAccept(TcpClient tcp)
 {
     if (BeforeAccept != null)
     {
         TcpEventArgs e = new TcpEventArgs(tcp);
         BeforeAccept.Invoke(this, e);
         return !e.Cancelled;
     }
     return true;
 }