------art_308_555677.1193731783816
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

On 10/30/07, Frank Preiswerk <frank.preiswerk / stud.unibas.ch> wrote:
>
> Yes, I understand that socket.recv() reads UP TO size bytes, but doesn't
> necessarily wait.
> How would you buffer the data?
>
> Maybe my server indeed sends some data when I think it doesn't, so my
> client
> receives a bit of data and thinks that's it. Buffering should do the trick
> here. But how?



If the server closes the connection after sending the data, you can simply
use socket#read. If you need to wait for the data and then process them as
they comes in, use #select in a loop until all the data have been received.

------art_308_555677.1193731783816--