Exemplo n.º 1
0
        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;
        }
Exemplo n.º 2
0
        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;
        }
Exemplo n.º 3
0
 public TcpHandler(IParamsTcpServer parameters, byte[] certificate, string certificatePassword)
 {
     _parameters          = parameters;
     _certificate         = certificate;
     _certificatePassword = certificatePassword;
 }
Exemplo n.º 4
0
 public TcpHandler(IParamsTcpServer parameters)
 {
     _parameters = parameters;
 }