Skip to content

Instantly share code, notes, and snippets.

@fizx
Created March 31, 2013 23:26
Show Gist options
  • Save fizx/5282442 to your computer and use it in GitHub Desktop.
Save fizx/5282442 to your computer and use it in GitHub Desktop.
require 'socket'
server = TCPServer.new ENV["PORT"]
loop do
client = server.accept
client.puts "Hello !"
client.puts "Time is #{Time.now}"
client.close
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment