Skip to content

Instantly share code, notes, and snippets.

@Najaf
Created May 28, 2014 22:49
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 Najaf/5baba136746740d47c71 to your computer and use it in GitHub Desktop.
Save Najaf/5baba136746740d47c71 to your computer and use it in GitHub Desktop.
#! /usr/bin/env ruby
require 'socket'
server = TCPServer.new ARGV.first.to_i
loop do
client = server.accept
client.puts "Hello, world"
client.close
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment