Esempio n. 1
0
 public ClientOptions(TcpClient tcpCl, ServerChat serverObj)
 {
     User_id = Guid.NewGuid().ToString();
     client  = tcpCl;
     server  = serverObj;
     serverObj.JoinConnection(this);
 }
Esempio n. 2
0
        static void Main(string[] args)
        {
            try
            {
                serverObj = new ServerChat();
                thread    = new Thread(new ThreadStart(serverObj.Listen));
                thread.Start();
            }



            catch (Exception ex)
            {
                serverObj.Deactivate();
                Console.WriteLine(ex.Message);
            }
        }