(self, rname, rhost)
进行rpc的连接
进行rpc的连接
进行rpc的连接
def remote_connect(self, rname, rhost):
        """进行rpc的连接
        """
        for cnf in self.remoteportlist:
            _rname = cnf.get('rootname')
            if rname == _rname:
                rport = cnf.get('rootport')
                if not rhost:
                    addr = ('localhost',rport)
                else:
                    addr = (rhost,rport)
                self.remote[rname].connect(addr)
                break
def remote_connect ( self , rname , rhost ) : for cnf in self . remoteportlist : _rname = cnf . get ( 'rootname' ) if rname == _rname : rport = cnf . get ( 'rootport' ) if not rhost : addr = ( 'localhost' , rport ) else : addr = ( rhost , rport ) self . remote [ rname ] . connect ( addr ) break