boost::asio::async_read_until composite completion condition
Hello List, I need to implement a completion condition for boost::asio::async_read_until where either a boost::regex is matched or boost::asio::transfer_at_least is matched. Any suggestions will be much appreciated. Kindly, Etienne
I need to implement a completion condition for boost::asio::async_read_until where either a boost::regex is matched or boost::asio::transfer_at_least is matched.
With this overload: http://www.boost.org/doc/libs/1_39_0/doc/html/boost_asio/reference/async_rea... ...you can implement any condition you wish.
Igor R wrote:
I need to implement a completion condition for boost::asio::async_read_until where either a boost::regex is matched or boost::asio::transfer_at_least is matched.
With this overload: http://www.boost.org/doc/libs/1_39_0/doc/html/boost_asio/reference/async_rea... ...you can implement any condition you wish. _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
Thank you. Etienne
With this overload: http://www.boost.org/doc/libs/1_39_0/doc/html/boost_asio/reference/async_rea... ...you can implement any condition you wish.
Hello List,
I get a compiling error:
error: no matching function for call to
'async_read_until(boost::asio::basic_stream_socket
read_condition( iterator begin, iterator end ) { boost::asio::ip::tcp::socket::receive_buffer_size option; socket_.get_option(option); if((end - begin) >= option.value()) { return std::make_pair(end,true); } while(begin != end) { if(*begin++ == '>') { return std::make_pair(begin,true); } } return std::make_pair(end,false); }
So why am I getting <unresolved overloaded function type>? Regards, Etienne
Never mind, got it working finally. I was using a class member function and not a free function. Etienne
participants (2)
-
Etienne Philip Pretorius
-
Igor R