Skip to content

Instantly share code, notes, and snippets.

@oelmekki
Created March 2, 2009 15:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oelmekki/72800 to your computer and use it in GitHub Desktop.
Save oelmekki/72800 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
require 'socket'
Host = 'google.com'
Port = 80
socket = TCPSocket.new( Host, Port )
socket.puts "GET /"
socket.readlines.each do |line|
p line
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment