[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Does Socket.send send all bytes?

mrchameleon

11/3/2003 10:17:00 PM

Does ruby's Socket.send send all bytes at once, or does one have to
keep count of bytes sent and repeat sending until all are sent (a la C
etc)?
2 Answers

ts

11/4/2003 10:54:00 AM

0

>>>>> "C" == Chris Reay <mrchameleon@hotmail.com> writes:

C> Does ruby's Socket.send send all bytes at once, or does one have to
C> keep count of bytes sent and repeat sending until all are sent (a la C
C> etc)?

Just try it

svg% ruby -rsocket -e 'p TCPSocket.new("ruby-lang.org", 80).send("1" * 81920, 0)'
33304
svg%


--

Guy Decoux

mrchameleon

11/4/2003 8:23:00 PM

0

ts <decoux@moulon.inra.fr> wrote in message news:<rfc8ymwflq0.fsf@moulon.inra.fr>...
<snip>
> Just try it
>
> svg% ruby -rsocket -e 'p TCPSocket.new("ruby-lang.org", 80).send("1" * 81920, 0)'
> 33304
> svg%

Fair comment :) Thanks!