From: Brian Candler Date: 2009-03-07T06:29:43+09:00 Subject: Re: Question about GServe and IO Michael Furmaniuk wrote: > loop do > if IO.select([io],nil,nil,5) > data = io.readpartial(4096) > op = handle_client(data,io) > io.puts op > end > break if io.closed? > end > io.close You don't need the select/readpartial stuff. Each connection is handled in its own thread. This should do: while line = io.gets handle_client(line,io) end I don't see the need for io.puts op, since you're sending responses in your handle_client already. You should be able to test this using plain old telnet. -- Posted via http://www.ruby-forum.com/.