Boost logo

Boost Users :

Subject: Re: [Boost-users] [asio] socket::read_some() splits data into two parts.
From: Brad Howes (bradley.howes_at_[hidden])
Date: 2011-05-11 08:33:39


On May 11, 2011, at 2:28 PM, Slav wrote:

> I sent 8004 bytes to server through TCP connection and successfully read it like this:

> But sometimes this code reads just 3752 (precisely) bytes and returns. After that it handles another async_read and reads 4525 bytes (which in sum gives 8004 bytes).

Well since your buffer is only 128 bytes long, I hope that you are getting that amount or less from each read_some call. But in general, what you are seeing is normal TCP behavior.

Brad

-- 
Brad Howes
Calling Team - Skype Prague
Skype: br.howes

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