daemon/core/broker.py
def recvloop(self):
        ''' Thread target that receives messages from server sockets.
        '''
        self.dorecvloop = True
        # note: this loop continues after emulation is stopped, 
        # even with 0 servers
        while self.dorecvloop:
            rlist = []
            with self.servers_lock:
                # build a socket list for select call
                for name in self.servers:
                    (h, p, sock) = self.servers[name]
                    if sock is not None:
                        rlist.append(sock.fileno())
            r, w, x = select.select(rlist, [], [], 1.0)
            for sockfd in r:
                try:
                    (h, p, sock, name) = self.getserverbysock(sockfd)
                except KeyError:
                    # servers may have changed; loop again
                    break
                rcvlen = self.recv(sock, h)
                if rcvlen == 0:
                    if self.verbose:
                        self.session.info("connection with %s @ %s:%s" \
                                          " has closed" % (name, h, p))
                    self.servers[name] = (h, p, None)
 Thread target that receives messages from server sockets.
        
Thread target that receives messages from server sockets.
Thread target that receives messages from server sockets .
def recvloop(self):
        self.dorecvloop = True
        while self.dorecvloop:
            rlist = []
            with self.servers_lock:
                for name in self.servers:
                    (h, p, sock) = self.servers[name]
                    if sock is not None:
                        rlist.append(sock.fileno())
            r, w, x = select.select(rlist, [], [], 1.0)
            for sockfd in r:
                try:
                    (h, p, sock, name) = self.getserverbysock(sockfd)
                except KeyError:
                    break
                rcvlen = self.recv(sock, h)
                if rcvlen == 0:
                    if self.verbose:
                        self.session.info("connection with %s @ %s:%s" \
                                          " has closed" % (name, h, p))
                    self.servers[name] = (h, p, None)
def recvloop ( self ) : self . dorecvloop = True while self . dorecvloop : rlist = [ ] with self . servers_lock : for name in self . servers : ( h , p , sock ) = self . servers [ name ] if sock is not None : rlist . append ( sock . fileno ( ) ) r , w , x = select . select ( rlist , [ ] , [ ] , 1.0 ) for sockfd in r : try : ( h , p , sock , name ) = self . getserverbysock ( sockfd ) except KeyError : break rcvlen = self . recv ( sock , h ) if rcvlen == 0 : if self . verbose : self . session . info ( "connection with %s @ %s:%s" " has closed" % ( name , h , p ) ) self . servers [ name ] = ( h , p , None )
Thread target that receives messages from server sockets.
Thread target that receives messages from server sockets .
''' Thread target that receives messages from server sockets.
        ''' # note: this loop continues after emulation is stopped,  # even with 0 servers # build a socket list for select call # servers may have changed; loop again
self