Skip to content

Instantly share code, notes, and snippets.

@marc-an-be
Created February 2, 2012 12:48
Show Gist options
  • Save marc-an-be/1723307 to your computer and use it in GitHub Desktop.
Save marc-an-be/1723307 to your computer and use it in GitHub Desktop.
Sample TCP Test-Server for a Ruboto Article
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