public Listener(TcpServerConfig config, ServerEndPoint serverEndPoint,ILoger loger) { this.config = config; this.server = new AsyncServer(config.MaxBufferPoolSize,config.BufferSize,config.MaxConnections,loger); this.server.Name = serverEndPoint.Name; this.localEndPoint = new IPEndPoint(IPAddress.Parse(serverEndPoint.IP), serverEndPoint.Port); }
public Listener(TcpServerConfig config, ServerEndPoint serverEndPoint, ILoger loger) { this.config = config; this.server = new AsyncServer(config.MaxBufferPoolSize, config.BufferSize, config.MaxConnections, loger); this.server.Name = serverEndPoint.Name; this.localEndPoint = new IPEndPoint(IPAddress.Parse(serverEndPoint.IP), serverEndPoint.Port); }
/// <summary> /// 构造函数 /// </summary> /// <param name="timeout">离线间隔</param> /// <param name="server">需要检测的server</param> public Monitor(int timeout, IAsyncServer server) { this.timeout = timeout; this.server = server; }