How do you 'cancel' a UdpClient::BeginReceive?
问题 I have a thread which sits around waiting for UDP messages from multiple interfaces using UdpClient::BeginReceive and a callback which calls UdpClient::EndReceive to pick up the data and pass it on. If after 5 seconds I don't get anything, I return from the function which calls UdpClient::BeginReceive so that the process can be cancelled and to issue another broadcast which would trigger external clients to send in UDP responses. If we're not cancelling, I call the UdpClient::BeginReceive