public TcpNETServer(IParamsTcpServer parameters, TcpHandler handler = null) { _parameters = parameters; _connectionManager = new TcpConnectionManager(); _handler = handler ?? new TcpHandler(_parameters); _handler.ConnectionEvent += OnConnectionEvent; _handler.MessageEvent += OnMessageEventAsync; _handler.ErrorEvent += OnErrorEvent; _handler.ServerEvent += OnServerEvent; }
public TcpNETServer(IParamsTcpServer parameters, byte[] certificate, string certificatePassword, TcpHandler handler = null) { _parameters = parameters; _connectionManager = new TcpConnectionManager(); _handler = handler ?? new TcpHandler(_parameters, certificate, certificatePassword); _handler.ConnectionEvent += OnConnectionEvent; _handler.MessageEvent += OnMessageEventAsync; _handler.ErrorEvent += OnErrorEvent; _handler.ServerEvent += OnServerEvent; }
public TcpHandler(IParamsTcpServer parameters, byte[] certificate, string certificatePassword) { _parameters = parameters; _certificate = certificate; _certificatePassword = certificatePassword; }
public TcpHandler(IParamsTcpServer parameters) { _parameters = parameters; }