send() not deliver all bytes?

后端 未结 3 563
故里飘歌
故里飘歌 2021-01-14 07:19

Why doesn\'t send() in winsock guarantee delivery of the all bytes you request?

This is TCP and it\'s blocking sockets.

Similarly,

3条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-14 07:43

    send tells you what it was able to send via its return value. Loop until send has cumulatively sent all the data or returns an error.

提交回复
热议问题