Jump to content
  • Advertisement
Sign in to follow this  
Slug

A few Networking question...

This topic is 4850 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

Hi, i've flipped some page from a winsock book, and i still have a few question to ask cause i'm not sure i got it all... 1st: How can i know when a connection is etablished??? did the call to listen of connect block itself 'till it connect or did i must check a message in my msg loop??? 2nd: How can i know if the other side of the connection is still conected and dosen't have crash, reboot or something like that??? 3rd: Did there is a way to send window message instead of data??? Thnx in advance to anyone who can help me!

Share this post


Link to post
Share on other sites
Advertisement
1) From MSDN:
"On a blocking socket, the return value indicates success or failure of the connection attempt." (0=connected). For non-blocking sockets follow the link to MSDN.

2) You check the value returned by recv(). Read more here

3) what??

Share this post


Link to post
Share on other sites
thx for you're reply. For the 3rd question, i was wondering if it was possible to send window message like WM_LBUTTONDOWN instead of data...

Share this post


Link to post
Share on other sites
a window message is simply a DWORD (0x0???).
convert the DWORD to data and send 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!