Skip to content

Instantly share code, notes, and snippets.

@axgle
Created October 25, 2009 04:09
Show Gist options
  • Save axgle/217890 to your computer and use it in GitHub Desktop.
Save axgle/217890 to your computer and use it in GitHub Desktop.
require 'socket'
server=TCPServer.new '127.0.0.1',9090
3000.times{
f=server.accept
puts f.gets
f.print "HTTP/1.1 200/OK\r\n"
f.print "content-type:text/html\r\n\r\n"
f.puts rand
f.close
}
#end
==============
http://www.devx.com/enterprise/Article/28101
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment