public EchoConnection(Socket socket, EchoServer echoServer)
        {
            this.echoServer = echoServer;
            this.socket = socket;

            NetworkStream netStr = new NetworkStream(socket);
            reader = new StreamReader(netStr);
            writer = new StreamWriter(netStr);

            Console.WriteLine("Connected");
        }
Exemplo n.º 2
0
        public EchoConnection(Socket socket, EchoServer echoServer)
        {
            this.echoServer = echoServer;
            this.socket     = socket;

            NetworkStream netStr = new NetworkStream(socket);

            reader = new StreamReader(netStr);
            writer = new StreamWriter(netStr);

            Console.WriteLine("Connected");
        }