public virtual bool Setup(INetServerConfig config, INetApplication application, INetProtocol protocol, ISocketSessionFactory sessionFactory) { if (protocol == null) { throw new ArgumentNullException("protocol"); } if (config == null) { throw new ArgumentNullException("config"); } if (application == null) { throw new ArgumentNullException("application"); } this.protocol = protocol; this.application = application; this.config = config; this.endPoint = new IPEndPoint(config.Address, config.Port); this.sessionFactory = sessionFactory; this.status = NetServerStatus.Inited; this.IsRunning = false; return(true); }
public override bool Setup(INetServerConfig config, INetApplication application, INetProtocol protocol, ISocketSessionFactory sessionFactory) { if (base.Setup(config, application, protocol, sessionFactory)) { Logger = LoggerManager.GetLogger(String.Concat(Application.Name, ".AsyncTcp.", config.Port)); this.sessionFactory = sessionFactory; return(true); } return(false); }
public virtual bool Setup(INetServerConfig config, INetApplication application, INetProtocol protocol) { return(false); }