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:
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:各位广大的菜鸟级程序员兄弟姐妹啊,学东西一定要看手册啊,网上的博客不靠谱啊不靠谱,你伤不起呀伤不起!