Chinaunix首页 | 论坛 | 博客
  • 博客访问: 87909
  • 博文数量: 19
  • 博客积分: 487
  • 博客等级: 下士
  • 技术积分: 205
  • 用 户 组: 普通用户
  • 注册时间: 2011-03-18 15:57
文章分类

全部博文(19)

文章存档

2011年(19)

我的朋友

分类: C/C++

2011-04-26 14:33:14

先看async_read:

This function is used to asynchronously read a certain number of bytes of data from a stream. The function call always returns immediately. The asynchronous operation will continue until one of the following conditions is true:

  • The supplied buffers are full. That is, the bytes transferred is equal to the sum of the buffer sizes.
  • An error occurred.

This operation is implemented in terms of zero or more calls to the stream's async_read_some function

手册上明显说明,函数在两种情况下会返回,要么缓冲区满要么出错,多好的一个函数啊!!!

下面看看悲催的async_receive:

This function is used to asynchronously receive data from the stream socket. The function call always returns immediately.

看到没,人家啥时候都是立即返回,有木有!这不是坑爹吗!

没收完你为神马还返回!有木有!

不看手册的程序员你伤不起啊,悲催啊……真想抽你丫的!

PS:各位广大的菜鸟级程序员兄弟姐妹啊,学东西一定要看手册啊,网上的博客不靠谱啊不靠谱,你伤不起呀伤不起

阅读(3201) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~