I have a UDP Listen Class with a standard Thread procedure that includes a blocking call:
BytesReceived = udpSocket.ReceiveFrom(Buffer, RemoteEndPoint)
My question is how do I shut down this Thread and Socket properly, I've tried
but this raises a System.Threading.ThreadAbortException: Thread was being aborted, error presumably as the socket receive is still blocking? Although it does release the udp port for me to connect again. Is there a neater way to shutdown?