def accept(self, timeout=None):
self.lock.acquire()<EOL>try:<EOL><INDENT>if len(self.server_accepts) > <NUM_LIT:0>:<EOL><INDENT>chan = self.server_accepts.pop(<NUM_LIT:0>)<EOL><DEDENT>else:<EOL><INDENT>self.server_accept_cv.wait(timeout)<EOL>if len(self.server_accepts) > <NUM_LIT:0>:<EOL><INDENT>chan = self.server_accepts.pop(<NUM_LIT:0>)<EOL><DEDENT>else:<EOL><INDENT>chan = None<EOL><DEDENT><DEDENT><DEDENT>finally:<EOL><INDENT>self.lock.release()<EOL><DEDENT>return chan<EOL>
Return the next channel opened by the client over this transport, in
server mode.  If no channel is opened before the given timeout,
``None`` is returned.

:param int timeout:
    seconds to wait for a channel, or ``None`` to wait forever
:return: a new `.Channel` opened by the client