Пример #1
0
 public void start()
 {
     Listener = new TcpListener(IPAddress.Any, port);
     Listener.Start(); // Запускаем его
     serverListener = new ServerListener(Listener, chatForm);
     Thread backgroundThread = new Thread(new ThreadStart(serverListener.listenNewUser));
     backgroundThread.Start();
 }
Пример #2
0
 public UserChat(UserInfo userInfo, ChatForm chatForm, ServerListener serverListener=null)
 {
     this.userInfo = userInfo;
     this.chatForm = chatForm;
     this.serverListener = serverListener;
 }