Hacker News new | ask | show | jobs
by gmazza 3370 days ago
> I wish there were an API to detect how much data still hasn't been acked.

From example code attached to the original article (Linux only):

  int outstanding;
  ioctl(fd, SIOCOUTQ, &outstanding);
2 comments

You have to be pretty careful about what conclusions you draw from this info. It means relatively little about what your actual peer has seen. It tells you a some info about the channel between you and your peer, though.

If you need detailed feedback, you need to implement a feature that closes the loop.

I guess that select() already had a meaning so it couldn't be used for this?