Replace the protocol with a simple handler function (protocol_entry_point).
Split the basic and multi-threaded server into 2 files.
move the daemon inside server (because not useful only for this particular project.