ServerNetworkConnections.TCPConnection.TCPConnection C# (CSharp) Method

TCPConnection() public method

Initializes the TCPConnection with the given TcpClient.
public TCPConnection ( TcpClient client, AbstractMessageParser parser ) : System
client System.Net.Sockets.TcpClient The TcpClient to the server.
parser AbstractMessageParser
return System
        public TCPConnection(TcpClient client, AbstractMessageParser parser)
        {
            this.client = client;
            this.stream = client.GetStream();
            this.writer = new StreamWriter(stream);
            this.reader = new StreamReader(stream);
            this.parser = parser;
            this.localEndPoint = client.Client.LocalEndPoint;
            this.remoteEndPoint = client.Client.RemoteEndPoint;
        }

Same methods

TCPConnection::TCPConnection ( String hostname, UInt16 port, AbstractMessageParser parser ) : System