10 Jun
2015
10 Jun
'15
11:56 p.m.
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