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 }
public static void InvokeSocketConnect(SocketConnectEventArgs e) { if (SocketConnect != null) SocketConnect(e); }
private static void EventSink_SocketConnect( SocketConnectEventArgs e ) { if ( !e.AllowConnection ) return; }
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; } }