First version of multithreaded reader server

Fixes blocking of the entire server when one of the output sockets is blocking.