示例#1
0
        private static void EventSink_SocketConnect( SocketConnectEventArgs e )
        {
            if ( !e.AllowConnection )
                return;

            if ( !NagleEnabled )
                e.Socket.SetSocketOption( SocketOptionLevel.Tcp, SocketOptionName.NoDelay, 1 ); // RunUO uses its own algorithm
        }
示例#2
0
 public static void InvokeSocketConnect(SocketConnectEventArgs e)
 {
     if (SocketConnect != null)
         SocketConnect(e);
 }
示例#3
0
 private static void EventSink_SocketConnect( SocketConnectEventArgs e )
 {
     if ( !e.AllowConnection )
         return;
 }
示例#4
0
        private bool VerifySocket(Socket socket)
        {
            try
            {
                SocketConnectEventArgs args = new SocketConnectEventArgs(socket);

                EventSink.InvokeSocketConnect(args);

                return args.AllowConnection;
            }
            catch (Exception ex)
            {
                NetState.TraceException(ex);

                return false;
            }
        }