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); }
public EasyServerSocket(ILogger logger, SocketConfiguration socketConfig, EasyServerSocketPool socketPool, EasyServerAccessController accessController) : base(logger, socketConfig) { this._socketPool = socketPool; this._accessController = accessController; }