Logo Search packages:      
Sourcecode: bcfg2 version File versions  Download package

def lib::Server::Component::Component::get_request (   self  ) 

We need to do work between requests, so select with timeout instead of blocking in accept

Definition at line 225 of file Component.py.

00225                          :
        '''We need to do work between requests, so select with timeout instead of blocking in accept'''
        rsockinfo = []
        while self.socket not in rsockinfo:
            if self.shut:
                raise socket.error
            for funcname in self.async_funcs:
                func = getattr(self, funcname, False)
                if callable(func):
                    func()
                else:
                    self.logger.error("Cannot call uncallable method %s" % (funcname))
            try:
                rsockinfo = select.select([self.socket], [], [], 10)[0]
            except select.error:
                continue
            if self.socket in rsockinfo:
                return self.socket.accept()

    def assert_location(self):


Generated by  Doxygen 1.6.0   Back to index