UDP blocking problem

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.
 
Not sure if it will help in this case but if you set the IsBackground property of a thread to true then it should be killed off when the app closes.
 

Similar threads

P
Replies
0
Views
176
Policy standard local admin account with Active Di
P
J
Replies
0
Views
63
Jessi_ca
J
Back
Top