Messing around with sockets in Ruby