02-asio学习

https://blog.csdn.net/weixin_42881084/article/details/101996032

https://blog.csdn.net/Marble_ccp/article/details/105326959?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522160786900019215668887506%2522%252C%2522scm%2522%253A%252220140713.130102334.pc%255Fall.%2522%257D&request_id=160786900019215668887506&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~all~first_rank_v2~rank_v29-5-105326959.pc_search_result_cache&utm_term=asio&spm=1018.2118.3001.4449

github: https://github.com/sprinfall/boost-asio-study

5种I/O模型理解:https://blog.51cto.com/10704527/1782715

        https://segmentfault.com/n/1330000004444307

endpoint:https://www.jianshu.com/p/d657df7e6887

大型项目代码:https://github.com/versatica/mediasoup

asio::async_read官网文档: https://www.boost.org/doc/libs/1_66_0/doc/html/boost_asio/reference/async_read/overload2.html

 async_read看起来像是调用了很多次async_read_some(每次只read一点点),在开发http客户端的时候,可以在响应头中的content-length中获取响应消息的字节长度length,

可以将length作为参数传给completion_condition:boost::asio::transfer_at_least(length),意思是,这次read的字节长度是length。

原文地址:https://www.cnblogs.com/kongweisi/p/14130894.html