Generic ruby socket server