Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I have a multithreaded application in which I would like a UDP socket to receive data whenever something is sent. As if it's "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~ I'm using VB.NET, but will understand syntax from other languages.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...