Ths Luis !

But how do I know the weight of the received bytes ? I have think of 
what you propose but can't find the way to "measure" the received stuff 
!!!

I have to use readline or gets to receive because the server (a java 
server) only offer me buffered stream and recv and read dont work in 
this case...

Serge

Luis Parravicini wrote:
> Hi Sergey
> 
> The server sends you the size of the image, so you can use that to
> check when the download completed. Also check the way you are reading
> the image, you are using IO::readline which is generally used to read
> lines of text. Take a look at IO::read to download the image.

-- 
Posted via http://www.ruby-forum.com/.