From: Jos Backus Date: 2004-10-22T01:24:38+09:00 Subject: Re: TCPSocket.new(host, port).readline hangs on Windows On Fri, Oct 22, 2004 at 12:26:47AM +0900, James F. Hranicky wrote: > 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: That's what I thought. There's nothing to read as the webserver doesn't write anything initially, hence the readline simply blocks. > 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 > }' So on Windows 2000 it appears to work as well. Are there any people that can confirm that it doesn't work on Windows 2003 Server? The fact that the Putty psftp.exe client works seems to suggest that the problem is specific to the Ruby interpreter, not Windows 2003 or the way Windows 2003 is configured here at work (I tried this on different machines). Thanks people! > Jim -- Jos Backus _/ _/_/_/ Sunnyvale, CA _/ _/ _/ _/ _/_/_/ _/ _/ _/ _/ jos at catnook.com _/_/ _/_/_/ require 'std/disclaimer'