Hey All
I'm pretty new to socket programming in c++, but i've managed to get a client/server thing going pretty well after a few days.
Everything is all hooked up and I'm sending packets both ways fine in general.
As a test, I tried sending 100 messages at once using send() and recv(), and it looks like I'm getting about half of them
to the other side.
What's the story with ACKing or whatever I need to do to be able to spam messages and guarantee their arrival?
-tom
Socket Issue
What's the story with ACKing or whatever I need to do to be able to spam messages and guarantee their arrival?
That depends on what your requirements are. They may be:
It's OK to lose some packets or receive some packets out of order, as long as most of them make it across as fast as possible. This is UDP.
It's OK to wait a little bit now and then, as long as all of the packets make it across in order. This is TCP.
Very seldom will you need any other guarantee. If you do, it's typically of the kind "I guarantee that most packets make it, but if some packet make it out of order, I drop it," which you can implement on top of UDP using a sequence counter.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement