Added commandline option '-p <timeout>' to enable polling on the writing socket.