Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 24 lines (13 sloc) 261 Bytes
#!/usr/bin/env ruby
require '../example'
example %q{
require 'webrick'
class HelloServer < WEBrick::GenericServer
def run(socket)
socket.print('Hello TCP/IP world')
end
end
s = HelloServer.new(:Port => 2000)
trap("INT"){ s.shutdown}
s.start
}
Jump to Line
Something went wrong with that request. Please try again.