# tcp_client.rb require 'socket' client = TCPSocket.new('localhost', 9090) client.puts("HI") line = client.gets puts line client.close