Is there a way to block on a socket send() until we get the ack for that packet?

后端 未结 7 1312
盖世英雄少女心
盖世英雄少女心 2020-12-31 12:47

Or do I have to implement it at the application level?

7条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-31 13:51

    If you are talking about TCP, then no - no socket API I've seen allows you to do this.

    You need to implement the ack in your application protocol if you need to be sure that the other end had received(and possibly processed) your data.

提交回复
热议问题