Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > TCPSocket question

Reply
Thread Tools

TCPSocket question

 
 
Günter Glück
Guest
Posts: n/a
 
      10-30-2004
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)



 
Reply With Quote
 
 
 
 
ts
Guest
Posts: n/a
 
      10-30-2004
>>>>> "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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Another TCPSocket Question Greg Chambers Ruby 9 07-22-2009 10:32 AM
Question About TCPServer & TCPSocket classes Steve Lewis Ruby 4 09-07-2008 01:02 AM
TCPSocket and rescue Mark Probert Ruby 2 09-05-2003 02:10 PM
BUG: Incorrect error numbers being reported with TCPSocket Alan Davies Ruby 0 08-05-2003 12:20 PM
TCPSocket & $SAFE=1 Jesper Olsen Ruby 2 08-01-2003 05:50 PM



Advertisments