Beispiel #1
0
 /// <summary>
 /// Instantiates.
 /// </summary>
 /// <param name="maxConnections">the max connections allowed</param>
 protected AbstractSocketAcceptor(Int32 maxConnections)
     : base(new DefaultSocketSessionConfig())
 {
     _maxConnections        = maxConnections;
     _processor             = new AsyncSocketProcessor(() => ManagedSessions.Values);
     this.SessionDestroyed += OnSessionDestroyed;
     _startAccept           = StartAccept0;
     ReuseBuffer            = true;
 }
Beispiel #2
0
 /// <summary>
 /// Instantiates.
 /// </summary>
 protected AbstractSocketConnector(IoSessionConfig sessionConfig)
     : base(sessionConfig)
 {
     _processor = new AsyncSocketProcessor(() => ManagedSessions.Values);
 }