private Method

GenericServer.accept_client(svr)

There's no documentation for this item.

Source Code

# File webrick/server.rb, line 144
def accept_client(svr)
  sock = nil
  begin
    sock = svr.accept
    sock.sync = true
    Utils::set_non_blocking(sock)
    Utils::set_close_on_exec(sock)
  rescue Errno::ECONNRESET, Errno::ECONNABORTED, Errno::EPROTO => ex
    # TCP connection was established but RST segment was sent
    # from peer before calling TCPServer#accept.
  rescue Exception => ex
    msg = "#{ex.class}: #{ex.message}\n\t#{ex.backtrace[0]}"
    @logger.error msg
  end
  return sock
end
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.