TCPSocket question

Discussion in 'Ruby' started by Günter Glück, Oct 30, 2004.

  1. hi

    i'm trying to use TCPSocket the first time and had a problem with it.

    <snip>
    require "socket"

    t = TCPSocket.new('rubyforge.org', 2401)
    t.puts "BEGIN VERIFICATION REQUEST\012"
    p t.gets
    t.close
    <snip>

    as the process blocks without printing some response i'm wondering
    what i'm doing wrong here?

    ping is ok. also manual telnet connection with this request gives a response
    from the server.

    best regards

    Günter Glück (ggl)
     
    Günter Glück, Oct 30, 2004
    #1
    1. Advertising

  2. Günter Glück

    ts Guest

    >>>>> "G" == =?ISO-8859-1?Q?G=FCnter Gl=FCck?= <ISO-8859-1> writes:

    Try with

    G> t.puts "BEGIN VERIFICATION REQUEST\012"

    t.puts "BEGIN VERIFICATION REQUEST\015\012"


    Guy Decoux
     
    ts, Oct 30, 2004
    #2
    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. Jesper Olsen

    TCPSocket & $SAFE=1

    Jesper Olsen, Jul 31, 2003, in forum: Ruby
    Replies:
    2
    Views:
    126
    Jesper Olsen
    Aug 1, 2003
  2. Alan Davies
    Replies:
    0
    Views:
    112
    Alan Davies
    Aug 5, 2003
  3. Mark Probert

    TCPSocket and rescue

    Mark Probert, Sep 4, 2003, in forum: Ruby
    Replies:
    2
    Views:
    118
    Mark Probert
    Sep 5, 2003
  4. Steve Lewis
    Replies:
    4
    Views:
    121
    Steve Lewis
    Sep 7, 2008
  5. Greg Chambers

    Another TCPSocket Question

    Greg Chambers, Jul 21, 2009, in forum: Ruby
    Replies:
    9
    Views:
    127
    Brian Candler
    Jul 22, 2009
Loading...

Share This Page