Jump to content
  • Advertisement
Sign in to follow this  
stodge

Does select() work on connection-less UDP sockets?

This topic is 4994 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Does select() work on connection-less UDP sockets? My initial experiments failed - I had a 5 second wait on the select, but when I sent some data from the client, nothing happened. the select() call returned 0. I'm presuming this is possible, but I'm not sure what I'm doing wrong. Thanks

Share this post


Link to post
Share on other sites
Advertisement
I just tried again, and when I run my server I get a return value of 1 from select(), without sending anything from the client. Weird.

Google, where are ya???

Share this post


Link to post
Share on other sites
Yeah I passed in all three masks - I'm getting a write action for the socket, whic h is weird as I'm not writing anything to it.

THanks

Share this post


Link to post
Share on other sites
Quote:
Original post by stodge
Yeah I passed in all three masks - I'm getting a write action for the socket, whic h is weird as I'm not writing anything to it.
Select notifies you when the socket is ready for writing (i.e. the output buffer isn't full), not when something has been written to it.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!