def shutdown_server(self, timeout_seconds=None):
self._queue.put(None)<EOL>self._shutdown_server.set()<EOL>
This method notifies the server that it should stop listening for
        new messages and shut down itself. If timeout_seconds was given, the
        method will block for this many seconds at most.