diff options
Diffstat (limited to 'sample/clnt.rb')
-rw-r--r-- | sample/clnt.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sample/clnt.rb b/sample/clnt.rb index c8c4b2db9f..7998379aa2 100644 --- a/sample/clnt.rb +++ b/sample/clnt.rb @@ -3,15 +3,15 @@ require "socket" -host=(if $ARGV.length == 2; $ARGV.shift; else "localhost"; end) +host=(if ARGV.length == 2; ARGV.shift; else "localhost"; end) print("Trying ", host, " ...") STDOUT.flush -s = TCPsocket.open(host, $ARGV.shift) +s = TCPsocket.open(host, ARGV.shift) print(" done\n") print("addr: ", s.addr.join(":"), "\n") print("peer: ", s.peeraddr.join(":"), "\n") while gets() s.write($_) - print(s.gets) + print(s.readline) end s.close |