コード例 #1
0
 public Client(TcpClient socket)
 {
     client = socket;
     networkStream = client.GetStream();
     _global = AppGlobal.Instance;
     iduser = -1;
     Console.WriteLine("New client connected");
     Thread t = new Thread(recieve);
     t.Start();
 }
コード例 #2
0
ファイル: Client.cs プロジェクト: RD125632/Pictionary
        public Client(TcpClient socket)
        {
            isActive = false;
            client = socket;
            networkStream = client.GetStream();
            _global = AppGlobal.Instance;
            Console.WriteLine("New client connected");
            Thread t = new Thread(recieve);
            t.Start();

            name = "";
        }
コード例 #3
0
        public Client(TcpClient socket)
        {
            client = socket;
            

            sslStream = new SslStream(client.GetStream());
            try
            {
                sslStream.AuthenticateAsServer(lib.SSLCrypto.LoadCert(), false, SslProtocols.Default, false);
            }
            catch (IOException e)
            {
                Console.WriteLine("IOExeption occured while a client tried to connect.");
                Console.WriteLine(e.StackTrace);
                Stop();
            }

            _global = AppGlobal.Instance;
            iduser = -1;
            Console.WriteLine("New client connected");
            _workerThread = new Thread(receive);
            _workerThread.Start();
        }