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>(); }
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; }
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; }
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; }
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; }
public ConnectionHandler(Socket client, IServiceCollection services, IHttpSessionStorage sessions) { this.client = client; this.services = services; SessionStorage = sessions; }