(self)
accepts an incoming socket connection (blocking)
accepts an incoming socket connection (blocking)
accepts an incoming socket connection ( blocking )
def accept(self):
        """accepts an incoming socket connection (blocking)"""
        while self.active:
            try:
                sock, addrinfo = self.listener.accept()
            except socket.timeout:
                pass
            except socket.error:
                ex = sys.exc_info()[1]
                if get_exc_errno(ex) == errno.EINTR:
                    pass
                else:
                    raise EOFError()
            else:
                break

        if not self.active:
            return

        sock.setblocking(True)
        self.logger.info("accepted %s:%s", addrinfo[0], addrinfo[1])
        self.clients.add(sock)
        self._accept_method(sock)
def accept ( self ) : while self . active : try : sock , addrinfo = self . listener . accept ( ) except socket . timeout : pass except socket . error : ex = sys . exc_info ( ) [ 1 ] if get_exc_errno ( ex ) == errno . EINTR : pass else : raise EOFError ( ) else : break if not self . active : return sock . setblocking ( True ) self . logger . info ( "accepted %s:%s" , addrinfo [ 0 ] , addrinfo [ 1 ] ) self . clients . add ( sock ) self . _accept_method ( sock )