/** * Starts the server */ public void Start() { _tcpListener.Start(); Console.WriteLine("Listening..."); while(true) { Socket socket = _tcpListener.AcceptSocket(); Client client = new Client(socket); _clients.Add(client); _userList.Add(client.GetNickname()); client.Start(); } }
public void Start() { _tcpListener.Start(); Console.WriteLine("Listening..."); while (true) { Socket socket = _tcpListener.AcceptSocket(); Client client = new Client(socket, "User"); clients.Add(client); client.Start(); } }