def accept(self, timeout=None):
if timeout == None:
timeout = -1
events = self.poll(select.POLLIN | errmask, timeout)
if not events:
raise ConnectionTimeout('nothing to accept')
if events[0][1] & (select.POLLHUP | select.POLLERR):
raise ConnectionClosed('error condition on socket')
return Connection.accept(self, Class=BlockingConnection)
评论列表
文章目录