def __reg_func__(self, rpc_id, func, input_types, output_types): rpc_func = MarshalWrap(func, input_types, output_types) ret = _pyrpc.server_reg(self.id, rpc_id, rpc_func) if ret != 0: _pyrpc.helper_decr_ref(rpc_func) else: self.func_ids[rpc_id] = rpc_func return ret
def unreg(self, rpc_id): _pyrpc.server_unreg(self.id, rpc_id) rpc_func = self.func_ids[rpc_id] del self.func_ids[rpc_id] _pyrpc.helper_decr_ref(rpc_func)