Some tcp scaffolding in the daemon