Building a simple websockets server from scratch in Ruby