Boost logo

Boost Users :

Subject: [Boost-users] async_read_some() not found??
From: Claude (clros_at_[hidden])
Date: 2011-08-10 05:05:33


I have this code (from async_read_until boost documentation):

boost::asio::streambuf b;

void handler(const boost::system::error_code& e, std::size_t size)
{
  if (!e)
  {
    std::istream is(&b);
    std::string line;
    std::getline(is, line);
   // ...
  }
}

boost::asio::async_read_until(s, b, "\r\n", handler);

But I obtain this error on Ubuntu 11.04 (boost 1.45.0):

boost/asio/impl/read_until.hpp|388|*error: request for member
‘async_read_some’* in
‘((boost::asio::detail::read_until_delim_op<boost::asio::basic_stream_socket<boost::asio::ip::tcp>*,
std::allocator<char>, void (*)(const boost::system::error_code&, unsigned
int)>*)this)->boost::asio::detail::read_until_delim_op&lt;boost::asio::basic_stream_socket&lt;boost::asio::ip::tcp&gt;*,
std::allocator<char>, void (*)(const boost::system::error_code&, unsigned
int)>::stream_’, which is of non-class type
‘boost::asio::basic_stream_socket<boost::asio::ip::tcp>*’

I Included in my project:
libpthread
libboost_system

--
View this message in context: http://boost.2283326.n4.nabble.com/async-read-some-not-found-tp3732368p3732368.html
Sent from the Boost - Users mailing list archive at Nabble.com.

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net