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