Boost logo

Boost Users :

Subject: Re: [Boost-users] Modify an asio echo server so that it does not send message back to client
From: Nicholas Yue (yue.nicholas_at_[hidden])
Date: 2015-06-10 19:56:04


On 2015-06-09 5:14 PM, Gavin Lambert wrote:
>
> You need to pass the bytes_transferred to process as well, so that it
> knows how much data was actually read and therefore how much of data_
> is actually valid. Don't forget that this may be less than max_length
> and may be different from what the client actually sent (ie. data sent
> in one chunk may be received in multiple chunks).
Thanks Gavin.

     I now have a process() method with the bytes_transferred parameter.

     Newbie question, how do I know the last chunk has been sent, so
that I can now process the data (which will be binary) ?

     Is there some simple example which illustrate this I can refer to ?

Cheers
Nicholas Yue


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