Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.



This topic is 6050 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 am having a problem with reading the incoming data... i use: "send (ctClient.ClientSocket, sendbuffer, strlen(sendbuffer), 0);" to send the data and then to read: "int err = recv(ctClient.ClientSocket, packet, sizeof(packet), 0 );" My qestion is: is it possible to only read one packet at once? And if it, how? Thanks, Zoot

Share this post

Link to post
Share on other sites
Not only is this not game-specific, but there''s a special forum just for this sort of problem, which is where I''m moving this to...

Your code should only read at most one packet. I don''t think there''s an easy way to guarantee you get it all in one go. Someone somewhere along the route might have an MTU smaller than your packet size or something like that.

[ MSVC Fixes | STL | SDL | Game AI | Sockets | C++ Faq Lite | Boost | Asking Questions ]

Share this post

Link to post
Share on other sites

  • 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!