Esempio n. 1
0
        public Server(int port, IHttpHandlersContext handlersContext)
        {
            this.port     = port;
            this.listener = new TcpListener(IPAddress.Parse(LocalhostIpAddress), port);

            this.handlersContext = handlersContext;
        }
Esempio n. 2
0
        public ConnectionHandler(
            Socket client,
            IHttpHandlersContext handlersContext)
        {
            CoreValidator.ThrowIfNull(client, nameof(client));
            CoreValidator.ThrowIfNull(handlersContext, nameof(handlersContext));

            this.client          = client;
            this.handlersContext = handlersContext;
        }