#!/usr/bin/ruby #A ruby festival client. Looks like the clnt.rb example to me. :) #Ron Sweeney #State a license, so proprietary is not assumed: #this is released under the conditions of the GPL. require "socket" host=(if ARGV.length == 2; ARGV.shift; else "localhost"; end) print("Trying ", host, " ...") STDOUT.flush s = TCPsocket.open(host, ARGV.shift) print(" done\n") print("addr: ", s.addr.join(":"), "\n") print("peer: ", s.peeraddr.join(":"), "\n") print("Type something and hit ENTER:\n") while gets s.write"(SayText \"#$_\")" end s.close