2 #### The Great Computer Language Shootout
3 #### http://shootout.alioth.debian.org/
5 #### Contributed by Robbert Haarman
6 #### Modified by Ian Osgood
10 N
= Integer(ARGV[0] || 10)
17 sock
= TCPServer
.new Host
, Port
21 reply
= 'x' * REPLY_SIZE
23 request
= conn
.read REQUEST_SIZE
24 break if request
== nil
29 conn
= TCPSocket
.new Host
, Port
33 request
= 'x' * REQUEST_SIZE
37 reply
= conn
.read REPLY_SIZE
39 bytes
= bytes
+ reply
.length
42 puts
"replies: #{replies}\tbytes: #{bytes}"