您当前的位置: 首页 > 

惊鸿一博

暂无认证

  • 3浏览

    0关注

    535博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

boost boost::asio::read read_some receive 区别

惊鸿一博 发布时间:2020-11-20 16:24:19 ,浏览量:3

boost boost::asio::read

尝试读一定数量的字节,直到读到为止,或者出错 . Attempt to read a certain amount of data from a stream before returning.  即收到指定的数据才返回。

 socket.read_some

读一下socket,读到多少算多少 

socket.receive:    

Receive some data on the socket.  即收到一些数据就返回。也即会导致所谓的short reads and writes.

带async的类似 

关注
打赏
1663399408
查看更多评论
立即登录/注册

微信扫码登录

0.0568s