Does Socket.send send all bytes?

Discussion in 'Ruby' started by Chris Reay, Nov 3, 2003.

  1. Chris Reay

    Chris Reay Guest

    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)?
    Chris Reay, Nov 3, 2003
    #1
    1. Advertising

  2. Chris Reay

    ts Guest

    >>>>> "C" == Chris Reay <> 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
    ts, Nov 4, 2003
    #2
    1. Advertising

  3. Chris Reay

    Chris Reay Guest

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


    Fair comment :) Thanks!
    Chris Reay, Nov 4, 2003
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jason Collins
    Replies:
    3
    Views:
    6,011
    Jason Collins
    Feb 18, 2004
  2. charvind
    Replies:
    0
    Views:
    555
    charvind
    Jul 2, 2007
  3. Laszlo Nagy
    Replies:
    1
    Views:
    4,811
    Mark Wooding
    Jan 27, 2009
  4. Jean-Paul Calderone
    Replies:
    0
    Views:
    962
    Jean-Paul Calderone
    Jan 27, 2009
  5. Ashwin Rao
    Replies:
    2
    Views:
    1,046
    Martien Verbruggen
    Dec 3, 2009
Loading...

Share This Page