On Tue, 2008-04-15 at 03:16 +0900, Vince Forgetta wrote:
> Figured it out.
> 
> I need to sleep between successive calls to TCPSocket.new (see simple
> example below):
> 
> require 'socket'
> for i in 0..20
>   session = TCPSocket.new('localhost', '1234')
>   session.puts "test"
>   dat = session.gets
>   p dat
>   session.close
>   sleep 0.5
> end
> 
> Using 'sleep 0' cause the server to hang.  Is there a way around this?
> 

Perhaps then you should paste server code, rather than client code.