Adding a CancellationToken to TcpListener.AcceptTcpClientAsync

A TcpListener opens a socket using TCP to listen for incoming connection requests. You can use AcceptTcpClientAsync to asynchronously get a TcpClient object, which you can then use to send and receive messages on the connection. AcceptTcpClientAsync Waits forever to get a connection. This is pretty much what you want most of the time… after … [Read more…]