Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            Console.WriteLine("Welcome to Console Chat Application\nPlease enter a login alias to continue");
            loginName = Console.ReadLine();
            var listener = new ThreadController();
            var chatThreadController_listener = new ChatThreadController(listener);
            var chatThreadController_sender   = new ChatThreadController(listener);

            var listenerThread = new Thread(chatThreadController_listener.listen);
            var senderThread   = new Thread(chatThreadController_listener.send);

            listenerThread.Start();
            senderThread.Start();
        }
Ejemplo n.º 2
0
 public ChatThreadController(ThreadController thread)
 {
     chatThread = thread;
 }