public WebsocketServer(IParamsWSServer parameters,
                               WebsocketHandler handler = null,
                               WSConnectionManager connectionManager = null)
        {
            _parameters        = parameters;
            _connectionManager = connectionManager ?? new WSConnectionManager();

            _handler = handler ?? new WebsocketHandler(_parameters);
            _handler.ConnectionEvent += OnConnectionEventAsync;
            _handler.MessageEvent    += OnMessageEventAsync;
            _handler.ErrorEvent      += OnErrorEventAsync;
            _handler.ServerEvent     += OnServerEventAsync;
        }
        public WebsocketServer(IParamsWSServer parameters,
                               byte[] certificate,
                               string certificatePassword,
                               WebsocketHandler handler = null,
                               WSConnectionManager connectionManager = null)
        {
            _parameters        = parameters;
            _connectionManager = connectionManager ?? new WSConnectionManager();

            _handler = handler ?? new WebsocketHandler(_parameters, certificate, certificatePassword);
            _handler.ConnectionEvent += OnConnectionEventAsync;
            _handler.MessageEvent    += OnMessageEventAsync;
            _handler.ErrorEvent      += OnErrorEventAsync;
            _handler.ServerEvent     += OnServerEventAsync;
        }
 public WebsocketHandler(IParamsWSServer parameters, byte[] certificate, string certificatePassword)
 {
     _parameters          = parameters;
     _certificate         = certificate;
     _certificatePassword = certificatePassword;
 }
 public WebsocketHandler(IParamsWSServer parameters)
 {
     _parameters = parameters;
 }
예제 #5
0
 public WebsocketHandlerAuth(IParamsWSServer parameters, byte[] certificate, string certificatePassword)
     : base(parameters, certificate, certificatePassword)
 {
 }
예제 #6
0
 public WebsocketHandlerAuth(IParamsWSServer parameters) : base(parameters)
 {
 }