bioserrors
New member
- Joined
- Jul 30, 2003
- Messages
- 2
I have a multithreaded application in which I would like a UDP socket to receive data whenever something is sent. As if its "listening" for data.
But if I want to quit the application before any data is sent to the UDP socket, I need to close the thread that is handling the UDP socket.
But since UDP.Receive() method blocks execution of that thread until data arrives, how do I gracefully close the thread? Should I send a "fake" message to it so that it stops blocking?
Just looking for input... thanks!
PS~ Im using VB.NET, but will understand syntax from other languages.
But if I want to quit the application before any data is sent to the UDP socket, I need to close the thread that is handling the UDP socket.
But since UDP.Receive() method blocks execution of that thread until data arrives, how do I gracefully close the thread? Should I send a "fake" message to it so that it stops blocking?
Just looking for input... thanks!
PS~ Im using VB.NET, but will understand syntax from other languages.