Hi Dear all
I want use async_read_until for read stream from socket until EOF,but I
can't compile code below.
code:
boost::asio::async_read_until(socket_,
stream_buffer_,boost::asio::transfer_all(),
boost::bind(&http_connection::handle_read_response, this,
boost::asio::placeholders::error,boost::asio::placeholders::bytes_transferred));
stream_buffer is instance of boost::asio::streambuf
I got the error like:
d:\development\boost_1_36_0\boost\asio\impl\read_until.ipp(953) : error
C2664: "bool boost::asio::detail::transfer_all_t::operator
()<iterator>(const Error &,size_t)":Can't convert paramerater 2 from
"iterator" to "size_t"
with
[
Error=iterator
]
d:\development\tcphttpbridge\httpconnection.cpp(75):参见对正在编译的函数 模 板
实例化"void
boost::asio::async_read_until