Created
May 28, 2014 23:21
-
-
Save Najaf/c6d6858511af83ea2d04 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env ruby | |
require 'socket' | |
server = TCPServer.new ARGV.first.to_i | |
loop do | |
client = server.accept | |
client.write(client.readline) | |
client.close | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment