Q: Stop TCP Listener When I stop my TCP Listener by the Stop command, I always get an error because I use BeginAcceptTcpClient to accept the clients. How can I stop a listener properly?

A: According to the MSDN Documentation for TcpListener.BeginAcceptTcpClient.

The asynchronous BeginAcceptTcpClient operation must be completed by calling the EndAcceptTcpClient method. Typically, the method is invoked by the callback delegate.

