CP socket client / server application using I/O multiplexing, child processes and threads