开发者

unget bytes to boost::asio::ip::tcp::socket

I need the two bytes to be read f开发者_如何转开发rom the socket, and, if necessary, bring them back into the socket, so the next handler read them. how it can be implemented? Thanks.


you could use read_some and have a buffer the size of 2 in the beginning then resize the buffer on the second read.

Hope this helps

also

http://www.boost.org/doc/libs/1_35_0/boost/asio/ssl/stream.hpp

peek function might be of more use to you.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜