public void Run() { while (true) { Socket clientSock = sock.Accept(); Client client = new Client(this, clientSock); } }
public void AddClient(Client client) { lock (clients) { clients.Add(client); } PostMessage(client.Username + " joined."); }
public MsgWindow() { server = new Server(this); client = new Client(); InitializeComponent(); }
public void RemoveClient(Client client) { lock (clients) { clients.Remove(client); } PostMessage(client.Username + " left."); }