Type:
Class
TCPSocket represents a TCP/IP client socket.
A simple client may look like:
1 2 3 4 5 6 7 8 9 | require 'socket' s = TCPSocket. new 'localhost' , 2000 while line = s.gets # Read lines from socket puts line # and print them end s.close # close socket when done |