コード例 #1
0
ファイル: User.cs プロジェクト: jkalter11/OpenSMO
        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);
        }
コード例 #2
0
ファイル: User.cs プロジェクト: Supermale/OpenSMO
        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 );
        }