method
accept_client
v1_8_7_330 -
Show latest stable
- Class:
WEBrick::GenericServer
accept_client(svr)private
No documentation available.
# File lib/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