boost.asio库学习笔记—— receive和read的区别:

receive和read的区别:

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

 read:  Attempt to read a certain amount of data from a stream before returning.  即收到指定的数据才返回。

你可能感兴趣的:(boost.asio库学习笔记—— receive和read的区别:)