public void RunAcceptConnectionLoop() { var Listener = new TcpListener(IPAddress.Loopback, PORT); Listener.Start(); while (true) { var Client = Listener.AcceptTcpClient(); var Connection = new DynLinkConnection(Client, this); Connections.Add(Connection); new Thread(Connection.RunCommunicationLoop).Start(); } //Listener.Stop(); }
public void RunAcceptConnectionLoop() { var Listener = new TcpListener(IPAddress.Loopback, PORT); Listener.Start(); while (true) { var Client = Listener.AcceptTcpClient(); var Connection = new DynLinkConnection(Client, this); Connections.Add(Connection); new Thread(Connection.RunCommunicationLoop).Start(); } //Listener.Stop(); }