Jump to content
  • Advertisement
Sign in to follow this  
Icebone1000

Winsock-Overlapped model doubt about rcv buffers

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

Simple doubt.. Sometimes you can handle all data received on a single buffer( receive, process, receive, process ..) But in the overlapped model, will the buffer contain just the last data received ? That sucks, because you will have to add not just an WSAOVERLLAPED struct per socket, but a recv buffer too..Is that right?

Share this post


Link to post
Share on other sites
Advertisement
Yes that is right, and yes that sucks. However, you can make it suck considerably less if you put the buffer and the WSAOVERLAPPED into one struct (something like struct Blah { WSAOVERLAPPED o; char buf[1024]; };).
The Winsock functions don't care (and don't need to know) that there is a buffer behind the WSAOVERLAPPED, but you have the advantage of getting it all in one chunk.

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!