Exemplo n.º 1
0
        public User(MainClass mainClass, TcpClient tcpClient)
        {
            this.mainClass = mainClass;
            this.tcpClient = tcpClient;

            this.User_IP = tcpClient.Client.RemoteEndPoint.ToString().Split(':')[0];

            NetworkStream stream = tcpClient.GetStream();

            stream.ReadTimeout = int.Parse(mainClass.ServerConfig.Get("Server_ReadTimeout"));
            this.tcpWriter     = new BinaryWriter(stream);
            this.tcpReader     = new BinaryReader(stream);

            ez = new Ez(this);
        }
Exemplo n.º 2
0
        public User( MainClass mainClass, TcpClient tcpClient )
        {
            this.mainClass = mainClass;
            this.tcpClient = tcpClient;

            this.User_IP = tcpClient.Client.RemoteEndPoint.ToString().Split( ':' )[ 0 ];

            NetworkStream stream = tcpClient.GetStream();
            stream.ReadTimeout = int.Parse( mainClass.ServerConfig.Get( "Server_ReadTimeout" ) );
            this.tcpWriter = new BinaryWriter( stream );
            this.tcpReader = new BinaryReader( stream );

            ez = new Ez( this );
        }