示例#1
0
        public GameTcpClient(string host, int port)
        {
            _client = new TcpCommunicator(host, port);

            _protocol = new PresentationLayer(
               new SessionLayer(
                   new SlipTransportLayer(_client))
               );
        }
        public ClientRequestHandler(Guid id, TcpClient clientConnected, GameTcpServer server)
        {
            this._id = id;
            this._clientSocket = clientConnected;
            this._tcpServer = server;
            this._communicator = new TcpCommunicator(_clientSocket);

            _protocol = new PresentationLayer(
                new SessionLayer(
                    new SlipTransportLayer(_communicator)));
        }