コード例 #1
0
 public Server(int port, IServiceCollection services)
 {
     this.port         = port;
     this.services     = services;
     sessions          = services.GetService <IHttpSessionStorage>();
     listener          = new TcpListener(IPAddress, port);
     uniqueConnections = new HashSet <string>();
 }
コード例 #2
0
        public Server(int port, IServerRoutingTable serverRoutingTable, IHttpSessionStorage httpSessionStorage)
        {
            this.port   = port;
            tcpListener = new TcpListener(IPAddress.Parse(LocalHostIpAddress), this.port);

            this.serverRoutingTable = serverRoutingTable;
            this.httpSessionStorage = httpSessionStorage;
        }
コード例 #3
0
        public ConnectionHandler(Socket client, IServerRoutingTable serverRoutingTable, IHttpSessionStorage sessionStorage)
        {
            client.ThrowIfNull(nameof(client));
            serverRoutingTable.ThrowIfNull(nameof(serverRoutingTable));

            this.client             = client;
            this.serverRoutingTable = serverRoutingTable;
            this.sessionStorage     = sessionStorage;
        }
コード例 #4
0
ファイル: Server.cs プロジェクト: andixboya/Test_Project
        public Server(int port, IServerRoutingTable serverRoutingTable, IHttpSessionStorage sessionStorage)
        {
            serverRoutingTable.ThrowIfNull(nameof(serverRoutingTable));

            this.port = port;
            this.serverRoutingTable = serverRoutingTable;

            this.tcpListener    = new TcpListener(IPAddress.Parse(LocalHostIpAddress), port);
            this.sessionStorage = sessionStorage;
        }
        public ConnectionHandler(Socket client, IServerRoutingTable serverRoutingTable, IHttpSessionStorage httpSessionStorage)
        {
            CoreValidator.ThrowIfNull(client, nameof(client));
            CoreValidator.ThrowIfNull(serverRoutingTable, nameof(serverRoutingTable));
            CoreValidator.ThrowIfNull(serverRoutingTable, nameof(httpSessionStorage));

            this.client             = client;
            this.serverRoutingTable = serverRoutingTable;
            this.httpSessionStorage = httpSessionStorage;
        }
コード例 #6
0
        public Server(int port, IServerRoutingTable serverRoutingTable, IHttpSessionStorage httpSessionStorage)
        {
            CoreValidator.ThrowIfNull(serverRoutingTable, nameof(serverRoutingTable));
            CoreValidator.ThrowIfNull(httpSessionStorage, nameof(httpSessionStorage));

            this.port = port;
            this.serverRoutingTable = serverRoutingTable;
            listener = new TcpListener(IPAddress.Parse(LocalhostIpAdderss), port);
            this.httpSessionStorage = httpSessionStorage;
        }
コード例 #7
0
 public ConnectionHandler(Socket client, IServiceCollection services, IHttpSessionStorage sessions)
 {
     this.client    = client;
     this.services  = services;
     SessionStorage = sessions;
 }