Odkazy:
require 'socket' hostname = 'localhost' port = 2000 s = TCPSocket.open(host, port) while line = s.gets puts line.chomp end s.close