public ConnectionHandler(Socket client, ServerRoutingTable serverRoutingTable)
        {
            CoreValidator.ThrowIfNull(client, nameof(client));
            CoreValidator.ThrowIfNull(serverRoutingTable, nameof(serverRoutingTable));

            this.client             = client;
            this.serverRoutingTable = serverRoutingTable;
        }
Example #2
0
        public Server(int port, ServerRoutingTable serverRoutingTable)
        {
            CoreValidator.ThrowIfNull(serverRoutingTable, nameof(serverRoutingTable));

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

            this.tcpListener = new TcpListener(IPAddress.Parse(LocalHostIpAddress), port);
        }
 public ConnectionHandler(Socket client, IServerRouthingTable serverRoutingTable)
 {
     this.client             = client;
     this.serverRoutingTable = serverRoutingTable;
 }