public TcpServerChannel() { this.socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp) { Blocking = false, NoDelay = true }; this.config = new AcceptConfig(); this.semaphore = new Semaphore(config.MaxConcurrentNumber, config.MaxConcurrentNumber); }
/// <summary> /// 设置配置信息 /// </summary> /// <param name="config"></param> public void SetConfig(AcceptConfig config) { this.config = config; }