Boost logo

Boost :

Subject: [boost] BOOST ASIO: Having successful READ from the SERVER ..??
From: Rahul Mathur (srivmuk_at_[hidden])
Date: 2013-10-30 23:53:15


All,

Initially after having done successful CONNECT with the server, sending
successful LOGON message and finally KEEP ALIVE status, I tried to read
from the server as -

--
boost::asio::streambuf data;
        std::size_t length = boost::asio::read(socket, data,
boost::asio::transfer_at_least(socket.available()));
--
but was able to partially receive response from remote server which I don't
think was completely successful, so to have COMPLETE RESPONSE from the
server, tried with below modification -
--
boost::system::error_code ec;
        boost::asio::streambuf data;
 std::size_t length = boost::asio::read(socket, data,
boost::asio::transfer_all(), ec);
---
but this modification doesn't work.
Any clue what should be the proper way?
Thanks!!

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk