Example #1
0
 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);
 }
Example #2
0
 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);
 }
Example #3
0
 /// <summary>
 /// 构造函数
 /// </summary>
 /// <param name="timeout">离线间隔</param>
 /// <param name="server">需要检测的server</param>
 public Monitor(int timeout, IAsyncServer server)
 {
     this.timeout = timeout;
     this.server = server;
 }
Example #4
0
 /// <summary>
 /// 构造函数
 /// </summary>
 /// <param name="timeout">离线间隔</param>
 /// <param name="server">需要检测的server</param>
 public Monitor(int timeout, IAsyncServer server)
 {
     this.timeout = timeout;
     this.server  = server;
 }