[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ruby-core
Subject:    Re: TCPSocket.new(host, port).readline hangs on Windows
From:       "James F. Hranicky" <jfh () cise ! ufl ! edu>
Date:       2004-10-21 15:26:47
Message-ID: 200410211126.42094.jfh () cise ! ufl ! edu
[Download RAW message or body]

On Wednesday 20 October 2004 02:48, James Britt wrote:

> c:\> ruby -rsocket -e 'p TCPSocket.new("james3480", 110 ).readline'
> "+OK SAproxy ready, send USER name:host[:port]\r\n"
>
>
> Trying port 80, with a web server running, hangs.
>
> James

Doesn't the web server require you ask for a URL? This works for me:

  ruby -rsocket -e 'TCPSocket.open("www.cise.ufl.edu", 80) { |s| 
    s.puts "GET / HTTP/1.0\n\n"; 
    while str = s.gets do puts str end 
  }'

Jim

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic