Why is it assumed that send may return with less than requested data transmitted on a blocking socket?

后端 未结 1 1397
Happy的楠姐
Happy的楠姐 2020-11-30 04:02

The standard method to send data on a stream socket has always been to call send with a chunk of data to write, check the return value to see if all data was sent and then k

相关标签:
1条回答
  • 2020-11-30 05:01

    The thing that is missing in above description is, in Unix, system calls might get interrupted with signals. That's exactly the reason blocking send(2) might return a short count.

    0 讨论(0)
提交回复
热议问题