C socket: does send wait for recv to end?

后端 未结 5 789
生来不讨喜
生来不讨喜 2020-12-15 11:36

I use blocking C sockets on Windows. I use them to send updates of a data from the server to the client and vice versa. I send updates at a high frequency (every 100ms). Doe

5条回答
  •  星月不相逢
    2020-12-15 12:02

    TCP guarantees delivery at a lower TCP stack level. It retries delivery until the receiving part acknowledges that the data was received, but your application may never know about that fact.

    Let's say that you are sending chunks of data and you need to place those chunks of data somewhere according to some logic. If your application is not prepared to know where each individual block has to be placed, receiving it at the TCP level may be useless. The original post was about the application level logic.

提交回复
热议问题