Created
February 2, 2012 12:48
-
-
Save marc-an-be/1723307 to your computer and use it in GitHub Desktop.
Sample TCP Test-Server for a Ruboto Article
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
require 'socket' | |
server = TCPServer.new('',1234) | |
loop do | |
socket = server.accept | |
while line = socket.gets | |
puts line | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment