start(&block)
Instance Public methods
Starts the server and runs the block
for each connection.
This method does not return until the server is stopped from a signal
handler or another thread using stop or shutdown.
If the block raises a subclass of StandardError the exception is logged and ignored. If an IOError or Errno::EBADF exception is raised the exception is ignored. If an Exception subclass is raised the exception is logged and re-raised which stops the server.
To completely shut down a server call shutdown from ensure:
1 2 3 4 5 6 7 8 | server = WEBrick::GenericServer. new # or WEBrick::HTTPServer.new begin server.start ensure server.shutdown end |
Please login to continue.