Basic client-server TCP implementation in Ruby