예제 #1
0
        private void Initialize(int maxConnection)
        {
            _socketPool       = new EasyServerSocketPool(maxConnection);
            _accessController = new EasyServerAccessController(maxConnection);

            for (int i = 0; i < maxConnection; i++)
            {
                _socketPool.Push(new EasyServerSocket(_logger, SocketConfiguration, _socketPool, _accessController));
            }

            _logger?.LogInformation("Complete initialize server - max conn:{0}", maxConnection);
        }
예제 #2
0
 public EasyServerSocket(ILogger logger, SocketConfiguration socketConfig, EasyServerSocketPool socketPool, EasyServerAccessController accessController)
     : base(logger, socketConfig)
 {
     this._socketPool       = socketPool;
     this._accessController = accessController;
 }