RosettaCodeData/Task/Sockets/Ruby/sockets.rb

5 lines
101 B
Ruby

require 'socket'
sock = TCPSocket.open("localhost", 256)
sock.write("hello socket world")
sock.close