Skip to content

Instantly share code, notes, and snippets.

@sirupsen
Last active March 8, 2017 20:57
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sirupsen/a98144088854a640bbe9974ccc2744a5 to your computer and use it in GitHub Desktop.
Save sirupsen/a98144088854a640bbe9974ccc2744a5 to your computer and use it in GitHub Desktop.
require 'socket'
10.times do |i|
puts i
client = TCPSocket.new("some.server", 9292)
client.write("GET / HTTP/1.1\r\nHost:whatever\r\n\r\n")
client.close
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment