def serve(): container_number = int(sys.argv[1]) port_number = int(sys.argv[2]) server = xmlrpc.server.SimpleXMLRPCServer(("0.0.0.0", port_number), allow_none=True) print("Container", container_number, "Listening on port", port_number, "...") server.register_function(Predict, "Predict") server.serve_forever()
def handle_server(server): print('Server RPC di 127.0.0.1 di port 6667') server.register_function(add_pasien, "add_pasien") server.register_function(get_pasien, "get_pasien") server.serve_forever()
def listen(use_new_keys=False): """ Listens on TIMESERVER_PORT for xml-rpc calls to functions: - get_signed_time(nonces) """ # Set the timeserver's signing key. print('Loading timeserver signing key.') timeserver.set_timeserver_key(load_timeserver_key(use_new_keys)) print('Timeserver signing key loaded.') # Create server server = xmlrpc.server.SimpleXMLRPCServer( (demo.TIMESERVER_HOST, demo.TIMESERVER_PORT), requestHandler=RequestHandler) #, allow_none=True) #server.register_introspection_functions() # Add a function to the Timeserver's xml-rpc interface. # Register function that can be called via XML-RPC, allowing a Primary to # request the time for its Secondaries. server.register_function(timeserver.get_signed_time, 'get_signed_time') server.register_function(timeserver.get_signed_time_ber, 'get_signed_time_ber') print('Timeserver will now listen on port ' + str(demo.TIMESERVER_PORT)) server.serve_forever()
def listen(): """ Listens on SECONDARY_SERVER_PORT for xml-rpc calls to functions """ global listener_thread # Create server server = xmlrpc.server.SimpleXMLRPCServer( (demo.SECONDARY_SERVER_HOST, demo.SECONDARY_SERVER_PORT), requestHandler=RequestHandler, allow_none=True) #server.register_introspection_functions() # Register function that can be called via XML-RPC, allowing a Primary to # send metadata and images to the Secondary. server.register_function(secondary_ecu.receive_msg_from_primary, 'receive_msg_from_primary') print(' Secondary will now listen on port ' + str(demo.SECONDARY_SERVER_PORT)) if listener_thread is not None: print('Sorry - there is already a Secondary thread listening.') return else: print(' Starting Secondary Listener Thread: will now listen on port ' + str(demo.SECONDARY_SERVER_PORT)) listener_thread = threading.Thread(target=server.serve_forever) listener_thread.setDaemon(True) listener_thread.start()
def serve(): container_number = int(sys.argv[1]) # first argument port_number = int(sys.argv[2]) # second argument server = xmlrpc.server.SimpleXMLRPCServer(("0.0.0.0", port_number)) print("Container", container_number, "Listening on port", port_number, "...") server.register_function(Predict, "Predict") server.serve_forever()
def setup(host, port): manager = Meter.Manager() server = xmlrpc.server.SimpleXMLRPCServer((host, port), requestHandler=RequestHandler, logRequests=False) server.register_introspection_functions() for method in (manager.login, manager.get_job, manager.submit_reading, manager.get_status): server.register_function(method) return manager, server
def setup(host, port): manager = Meter.Manager() server = xmlrpc.server.SimpleXMLRPCServer((host, port), requestHandler=RequestHandler, logRequests=False) server.register_introspection_functions() for method in (manager.login, manager.get_job, manager.submit_reading, manager.get_status): server.register_function(method) return manager, server
def main(port=8000, address='', quiet=False): 'if __name__ == __main__' with Server((address, port), xmlrpc.server.SimpleXMLRPCRequestHandler, not quiet) as server: server.register_function(judge) if not quiet: print('Serving XML-RPC on', address or 'localhost', 'port', port) try: server.serve_forever() except KeyboardInterrupt: print() if not quiet: print("Keyboard interrupt received, exiting.")
def serve(): """Starts a server listening for Slaves requesting or submitting work""" def get_work_pickled(cores_max): return tuple(map(pickle.dumps, get_work(cores_max))) def submit_work_pickled(*args): submit_work(*tuple(map(pickle.loads, args))) return True # pickling over xml over rpc, yeah # we need to pickle because xmlrpcserver only understands few types # Dunno if this server can serve multiple requests concurrently server = xmlrpc.server.SimpleXMLRPCServer(("kirk.zulan.net", 8000), use_builtin_types=True) print("Listening on port 8000...") server.register_function(get_work_pickled, "get_work_pickled") server.register_function(submit_work_pickled, "submit_work_pickled") server.serve_forever()
def getsensorCO(): for i in range(0, len(sensor)): if sensor[i]["topik"] == "sensor/suhu": return json.dumps(sensor[i]) server.register_function(getAllsensor, 'getAllsensor') server.register_function(getsensorsuhu, 'getsensorsuhu') server.register_function(getsensorkelembaban, 'getsensorkelembaban') server.register_function(getsensorCO, 'getsensorCO') server.serve_forever()
def start_server(): global started global server if started is None: import xmlrpc.server import threading server = xmlrpc.server.SimpleXMLRPCServer(('127.0.0.1', 0), allow_none=True) server.register_function(in_main_thread(interactive.run), 'run') host, port = server.server_address path = server_address_file() if not path.parent.exists(): path.parent.mkdir(parents=True) started = host, port write_server_address() thread = threading.Thread(target=server.serve_forever, daemon=True) thread.start() server_thread = thread
def start(self): ''' starts the network server for secure file up-/downloads ''' if not (self._args.port > 0 and self._args.port < 65536): print("Please choose a valid port number.", file=sys.stderr) sys.exit(1) # create the storage directory if it does not exist if not os.path.isdir("%s-storage" % self._path): os.mkdir("%s-storage" % self._path) ctx = self._makectx() server = xmlrpc.server.SimpleXMLRPCServer( (self._args.address, self._args.port), bind_and_activate=False) server.socket = ctx.wrap_socket(server.socket, server_side=True) server.server_bind() server.server_activate() print("Server listening on %s:%s..." % (self._args.address, self._args.port), file=sys.stderr) server.register_multicall_functions() server.register_function(self.upload, "upload") server.register_function(self.download, "download") server.serve_forever()
def serve_forever(self): self.register_zeroconf() addr = ("0.0.0.0", self.port) server = xmlrpc.server.SimpleXMLRPCServer(addr) print("serving on", addr) frzr = FreezerInstance() db = FreezerDB() server.register_function(db.read_all, "read_all") server.register_function(db.read_albums, "read_albums") server.register_function(frzr.zip_album) server.register_function(frzr.search, name="search") server.serve_forever() try: while True: time.sleep(0.1) except KeyboardInterrupt: pass finally: print("\nUnregistering...") self.close()
def listen(): """ Listens on DIRECTOR_SERVER_PORT for xml-rpc calls to functions: - submit_vehicle_manifest - submit_ecu_manifest - register_ecu_serial Note that you must also run host() in order to serve the metadata files via http. """ global director_service_thread # Create server server = xmlrpc.server.SimpleXMLRPCServer( (demo.DIRECTOR_SERVER_HOST, demo.DIRECTOR_SERVER_PORT), requestHandler=RequestHandler, allow_none=True) #server.register_introspection_functions() # Register function that can be called via XML-RPC, allowing a Primary to # submit a vehicle version manifest. server.register_function( director_service_instance.register_vehicle_manifest, 'submit_vehicle_manifest') # In the longer term, this won't be exposed: it will only be reached via # register_vehicle_manifest. For now, during development, however, this is # exposed. server.register_function(director_service_instance.register_ecu_manifest, 'submit_ecu_manifest') server.register_function(director_service_instance.register_ecu_serial, 'register_ecu_serial') if director_service_thread is not None: print('Sorry - there is already a Director service thread listening.') return else: print(' Starting Director Services Thread: will now listen on port ' + str(demo.DIRECTOR_SERVER_PORT)) director_service_thread = threading.Thread(target=server.serve_forever) director_service_thread.setDaemon(True) director_service_thread.start()
else: string2 = string2.zfill(len(string1)) place = 0 carry = 0 products = [] for val2 in reversed(string2): curr_product = ['0' for _ in range(place)] for val1 in reversed(string1): product = int(val1) * int(val2) + carry curr_product.append(str(product % 10)) carry = product // 10 curr_product.append(str(carry)) products.append(''.join(curr_product)[::-1]) place += 1 final_product = '0' for product in products: final_product = adder_server.network_add(final_product, product) return final_product if __name__ == '__main__': server = xmlrpc.server.SimpleXMLRPCServer(("0.0.0.0", 8001), allow_none=True) server.register_instance(Multiplier()) server.register_function(Multiplier.network_multiply) server.register_function(Multiplier.set_adder_server) server.serve_forever()
def perkalian(a, b): return (a * b) def pembagian(a, b): return (a / b) def prima(a): if a == 2: hasil = "adalah bilangan prima" elif a > 2: for i in range(2, a): if (a % i) == 0: hasil = "bukan bilangan prima" break else: hasil = "adalah bilangan prima" else: hasil = "bukan bilangan prima!" return (hasil) server.register_function(prima, 'prima') server.register_function(pembagian, 'pembagian') server.register_function(perkalian, 'perkalian') server.register_function(pengurangan, 'pengurangan') server.register_function(penjumlahan, 'penjumlahan') server.serve_forever()
for i in data_sensor: if(i["sensor"] == par): temp.append(i) json_sensor = json.dumps(temp) return json_sensor def handle_message(mqttc, obj, msg): topic = msg.topic payload = msg.payload.decode("ascii") sensor = topic.replace("/sensor/","") print("Sensor : ",sensor,"\t, Payload : ",payload) data_baru = { "sensor" : sensor, "data" : payload } data_sensor.append(data_baru) def handle_thread(): sub.on_message = handle_message sub.loop_forever() # register fungsinya server.register_function(getALL, "getALL") server.register_function(getSensor, "getSensor") t=Thread(target=handle_thread, args=()) # Start thread baru t.start() # Running server RPC server.serve_forever()
n, pid = running_games[port] pid.terminate() return 1 return 0 def killGame(port): cleanUpGames() if port in running_games: n, pid = running_games[port] pid.kill() return 1 return 0 def log(port): if port in last_log: return open(last_log[port], 'r').read() return "" with server.SimpleXMLRPCServer(("", SERVER_PORT), requestHandler=RequestHandler) as server: server.register_introspection_functions() server.register_function(games) server.register_function(cleanUpGames) server.register_function(runningGames) server.register_function(startGame) server.register_function(stopGame) server.register_function(killGame) server.register_function(log) server.serve_forever()
#fungsi perkalian def perkalian(a, b): return (a * b) #fungsi pengecekan bilangan prima def isPrima(a): if a > 1: for i in range(2, a): temp = a % i if temp == 0 & a == 2: return False else: return True break i = i + 1 else: return False # register fungsinya server.register_multicall_functions() server.register_function(penjumlahan, "penjumlahan") server.register_function(pengurangan, "pengurangan") server.register_function(perkalian, "perkalian") server.register_function(pembagian, "pembagian") server.register_function(isPrima, "isPrima") # Running server RPC server.serve_forever()
def serve_forever(self, signals=None): """ \param signals which signals will cause normal exit """ if signals is not None: for s in signals: self._logger.debug("Registering %s for %s signal...", _interrupt_raiser, s) signal.signal(s, _interrupt_raiser) self._logger.info("Starting %d worker(s) listening on \"%s:%d\"...", self._worker_count, *self._addr) with self._hub.context(capacity=self._capacity()): class XMLRPCServer(xmlrpc.server.SimpleXMLRPCServer): def __init__(self, *args, **kwargs): super(XMLRPCServer, self).__init__(*args, **kwargs) self.request_timeout = False def handle_request(self): self.request_timeout = False super(XMLRPCServer, self).handle_request() def handle_timeout(self): self.request_timeout = True server = XMLRPCServer(addr=self._addr, allow_none=True) server.timeout = self._query_interval server.register_function(self._add_task, name='add_task') self._logger.debug("Starting threads...") workers = [] for i in range(self._worker_count): thread = threading.Thread(target=self._worker, args=(i,)) thread.start() workers.append(thread) self._logger.debug("%d workers were started.", self._worker_count) self._logger.debug("Starting xmlrpc server...") try: self._logger.debug("Entering task handling loop...") while True: if not server.request_timeout: self._logger.debug("Waiting for request...") server.handle_request() if not server.request_timeout: self._logger.debug("Request was handled.") if self._need_registration.is_set(): self._logger.debug("Registration is needed...") try: self._logger.debug("Trying to register machine...") self._hub.register_machine(capacity=self._capacity()) self._logger.debug("Machine was successfully registered.") self._need_registration.clear() except Exception as e: self._logger.exception("Unable to register due to %s.", e) else: self._logger.debug("Trying to ping...") try: if not self._hub.ping(): self._need_registration.set() self._logger.debug("Pinged.") except Exception as e: self._logger.exception("Unable to ping due to %s.", e) self._need_registration.set() except (KeyboardInterrupt, _InterruptedError) as e: self._logger.debug("Exiting.") self._quit.set() self._logger.debug("Joining workers...") for worker in workers: worker.join() self._logger.info("Completed.")
#!/usr/bin/python import xmlrpc.server import sys import os savepath = sys.argv[1] if not os.path.exists(savepath): os.makedirs(savepath) def save(data, name): with open(os.path.join(savepath, name), "w) as DATA_PATH: DATA_PATH.write(data) return True server = xmlrpc.server.SimpleXMLRPCServer(("0.0.0.0", 5000)) print("Listening on port 5000") server.register_function(save, "save") server.serve_forever()
# create an SSL context self.context = ssl.SSLContext(ssl_version) self.context.load_cert_chain(certfile=certfile, keyfile=keyfile) xmlrpc.server.SimpleXMLRPCDispatcher.__init__(self, allow_none, encoding) # call TCPServer constructor socketserver.TCPServer.__init__(self, addr, requestHandler, bind_and_activate) if fcntl is not None and hasattr(fcntl, 'FD_CLOEXEC'): flags = fcntl.fcntl(self.fileno(), fcntl.F_GETFD) flags |= fcntl.FD_CLOEXEC fcntl.fcntl(self.fileno(), fcntl.F_SETFD, flags) def get_request(self): newsocket, fromaddr = self.socket.accept() # create a server-side SSL socket sslsocket = self.context.wrap_socket(newsocket, server_side=True) return sslsocket, fromaddr def browser_function(url): browsercmd="iexplore.exe -k "+url #browsercmd="firefox "+url os.system(browsercmd) server = SecureXMLRPCServer(('localhost', 8000), 'cert.pem') server.register_introspection_functions() server.register_function(browser_function, 'browse') server.serve_forever()
import xmlrpc.server class Adder: @staticmethod def network_add(string1, string2): if len(string1) <= len(string2): string1 = string1.zfill(len(string2)) else: string2 = string2.zfill(len(string1)) zipped = zip(reversed(string1), reversed(string2)) carry = 0 final_sum = [] for val1, val2 in zipped: curr_sum = int(val1) + int(val2) + carry final_sum.append(str(curr_sum % 10)) carry = curr_sum // 10 final_sum.append(str(carry)) return ''.join(final_sum)[::-1].lstrip('0') if __name__ == '__main__': server = xmlrpc.server.SimpleXMLRPCServer(("0.0.0.0", 8000)) server.register_instance(Adder()) server.register_function(Adder.network_add) server.serve_forever()
# import xmlrpc import xmlrpc.server # inisiasi servernya server = xmlrpc.server.SimpleXMLRPCServer(("0.0.0.0", 1409)) # Definisikan procedure/fungsi yang akan dipanggil di client def penjumlahan(a, b): return (a + b) # Daftarkan fungsi yang akan dipanggil client server.register_function(penjumlahan, 'penjumlahan') # Jalankan server server.serve_forever()
self.context = ssl.SSLContext(ssl_version) self.context.load_cert_chain(certfile=certfile, keyfile=keyfile) xmlrpc.server.SimpleXMLRPCDispatcher.__init__(self, allow_none, encoding) socketserver.TCPServer.__init__(self, addr, requestHandler, bind_and_activate) if fcntl is not None and hasattr(fcntl, 'FD_CLOEXEC'): flags = fcntl.fcntl(self.fileno(), fcntl.F_GETFD) flags |= fcntl.FD_CLOEXEC fcntl.fcntl(self.fileno(), fcntl.F_SETFD, flags) def get_request(self): newsocket, fromaddr = self.socket.accept() sslsocket = self.context.wrap_socket(newsocket, server_side=True) return sslsocket, fromaddr def test(arg): #print(arg) return arg server = SecureXMLRPCServer(('localhost', 8000), 'cert.pem') server.register_introspection_functions() server.register_function(pow) server.register_function(test) server.serve_forever()
# Import library xmlrpc import xmlrpc.server # Inisiasi server server = xmlrpc.server.SimpleXMLRPCServer(("0.0.0.0", 7778)) # Definisi procedure atau fungsi def penjumlahan(a, b): return (a + b) # register fungsinya server.register_function(penjumlahan, "penjumlahan") # Running server RPC server.serve_forever()
def serve_forever(self): self.register_zeroconf() addr = ("0.0.0.0", self.port) with xmlrpc.server.SimpleXMLRPCServer(addr, allow_none=True, logRequests=False) as server: print("Listening on", addr) server.register_function(self._get_nick, "get_nick") server.register_function(self._update_remote_info, "update_remote_info") server.register_function(self._files_exist, "files_exist") server.register_function(self._receive, "receive") server.register_function(self._permission_needed, "permission_needed") server.register_function(self._get_permission, "get_permission") server.register_function(self._prevent_overwriting, "prevent_overwriting") server.register_function(self._abort_transfer, "abort_transfer") server.register_function(self._abort_request, "abort_request") server.register_function(self._update_progress, "update_progress") server.register_function(self._ping, "ping") server.serve_forever()
Moving = True move1 = abs(dm1) if dm1 > 0: dir1 = "a".encode('ASCII') else: dir1 = "c".encode('ASCII') move2 = abs(dm2) if dm2 > 0: dir2 = "b".encode('ASCII') else: dir2 = "d".encode('ASCII') while Moving: print("{move1}, {move2} ".format(move1=move1, move2=move2), end="\r") Moving = False if move1: ser.write(dir1) move1 -= 1 Moving = True ser.read() if move2: ser.write(dir2) move2 -= 1 Moving = True ser.read() return True server = xmlrpc.server.SimpleXMLRPCServer(("0.0.0.0", 5000)) print("Listening on port 5000") server.register_function(move, "move") server.serve_forever()
@author: Cid Santiago """ import xmlrpc.server, sys def soma(a, b): return a + b def sub(a, b): return a - b def mult(a, b): return a * b def div(a, b): return a / b server = xmlrpc.server.SimpleXMLRPCServer(('localhost', 7890)) print('Servidor ativo na porta 7890...\n') server.register_function(soma, 'soma') server.register_function(sub, 'sub') server.register_function(mult, 'mult') server.register_function(div, 'div') server.serve_forever()
def xmlrpc_get_object_size(serialized_file): img_bgr = get_img_bgr(serialized_file) return object_size.get_size(img_bgr) def xmlrpc_is_paper_present(serialized_file): img_bgr = get_img_bgr(serialized_file) return paper_detection.is_paper(img_bgr) class PersistentService: def __init__(self): self.x = 0 def getX(self): self.x += 1 return self.x with xmlrpc.server.SimpleXMLRPCServer(('localhost', PORT)) as server: print("serving at port", PORT) server.register_introspection_functions() server.register_function(xmlrpc_get_object_size, "getObjectSize") server.register_function(xmlrpc_is_paper_present, "isPaperPresent") server.register_instance(PersistentService()) server.register_multicall_functions() try: server.serve_forever() finally: server.server_close()
__sender_done.set() return True def is_sender_done(): __sender_done.wait() __sender_done.clear() return True def get_results(): return __results # Register functions server.register_function(mark_sender_ready) server.register_function(is_receiver_ready) server.register_function(mark_sender_done) server.register_function(get_results) # Convenience functions def clear_processes(): os.system("pkill iperf") os.system("pkill netserver") os.system("pkill netperf") os.system("pkill perf") os.system("pkill sar") def run_iperf(cpu, port, window):
data.append(data_baru) with open('data.json', 'w') as f: json.dump(data, f) print("Topik : " + topic + " || Payload : " + payload) conn.subscribe("/sensor/#") conn.on_message = handle_message conn.loop_forever() def get_all(): return data def get_sensor(jenis): for i in range(0, len(data)): if jenis == data[i][jenis]: return data[i] server.register_function(get_all, 'sensor') server.register_function(get_sensor, 'jenis_sensor') server.serve_forever() while True: sub = mqtt_client.Client() conn = sub.connect("127.0.0.1", 1883) t = Thread(target=handle_publisher, args=(conn, )) t.start()
with open('DB' + str(porta) + '/' + str(name) + '.txt', "r") as handle: data = handle.read() return data except FileNotFoundError as e: return False global porta porta = input('Digite a porta que deseja utilizar:\n') try: os.mkdir("DB" + str(porta)) except: print("Pasta já existente!:)\n") # Recebendo informações do proxy end_proxy = input( "Digite o endereço do servidor proxy (http://<ip>:<porta>): ") proxy = xmlrpc.client.ServerProxy(end_proxy) # Registrando datanode no namenode proxy.dnRegister(porta) server = xmlrpc.server.SimpleXMLRPCServer(('localhost', int(porta))) print('Datanode ' + str(porta) + ' ativo na porta ' + str(porta) + '...\n') server.register_function(createFile, 'createFile') server.register_function(updateFile, 'updateFile') server.register_function(deleteFile, 'deleteFile') server.register_function(readFile, 'readFile') server.serve_forever()
| pygame.HWSURFACE if options.fullscreen else pygame.DOUBLEBUF) pygame.display.set_caption("Evolving springbot") pygame.mouse.set_visible(not options.fullscreen) # Create server try: server = xmlrpc.server.SimpleXMLRPCServer(('', options.port)) except socket.error as err: print(err) sys.exit(1) if options.verbose: print("Server listening on port %d" % (options.port)) # Register functions server.register_function(fitness_test) server.register_function(quit) # Starts the pygame QUIT listening thread if SHOW_GRAPHICS: thread = threading.Thread(target=eventListener, name="pygame event listener") thread.start() draw_waiting("WAITING FOR CONNECTIONS") # Start server try: server.serve_forever() except KeyboardInterrupt: quit()
count = float(num2) count2 = float(num3) except ValueError: return "ErrType" if str == "Круг" : if count > 0: c = circle(count) return c.reckon() else: return "ErrZero" if str == "Прямоугольник" : if ((count > 0) and (count2 > 0)) : r = rectangle(count,count2) return r.reckon() else : return "ErrZero" if str == "Квадрат" : if count > 0: s = square(count) return s.reckon() else: return "ErrZero" server.register_function(evaluate) server.register_introspection_functions() print("[Соединение с сервером успешно установлено]") print("[Сервер в ожидании выражения]") server.serve_forever()
def server(): server = xmlrpc.server.SimpleXMLRPCServer(("0.0.0.0", 8081)) print("start service get power on 0.0.0.0 8081...") server.register_function(get_power, "get_power") server.serve_forever()
def download(currentPath, name): with open(currentPath + name, 'rb') as f: return xmlrpc.client.Binary(f.read()) def help(): return 'ls\ncd <Ruta>\ncreate <Nombre del archivo>\nread <Nombre del archivo>\nwrite <Nombre del archivo> <Texto a escribir>\nrename <Nombre> <Nuevo nombre>\nrm <Nombre>\nmkdir <Nombre>\nrmdir <Nombre>\nupload <Ruta del archivo local>\ndownload <Nombre>' class RequestHandler(xmlrpc.server.SimpleXMLRPCRequestHandler): rpc_paths = ('/mis_archivos', ) with xmlrpc.server.SimpleXMLRPCServer(('192.168.1.76', 8000), requestHandler=RequestHandler) as server: server.register_function(create) server.register_function(read) server.register_function(write) server.register_function(rename) server.register_function(remove) server.register_function(rmdir) server.register_function(createdir) server.register_function(ls) server.register_function(cd) server.register_function(help) server.register_function(upload) server.register_function(download) server.serve_forever()
# TO-DO : Implement Print Finger Tables def printFingerTable(): pass if __name__ == '__main__': nodeHost = input('Please Enter Node IP : ') nodePort = int(input('Please Enter Port Number : ')) nodeId = input('Please Enter Node Id : ') nodeURL = 'http://' + nodeHost + ':' + str(nodePort) + '/' node = Node([], None, None, [], nodeURL, nodeId) server = SimpleXMLRPCServer((nodeHost, nodePort)) server.register_function(join, 'join') server.register_function(join_done, 'join_done') listener = threading.Thread(target=server.serve_forever) listener.start() # if nodeId == 'node-0' : # server.register_function(join,'join') # server.register_function(join_done,'join_done') # server.serve_forever() if nodeId != 'node-0': targetURL = input('Please enter target URL : ') with xmlrpc.client.ServerProxy(targetURL) as proxy: node.unwrap(proxy.join(nodeURL)) print('Successor of Node ', nodeId, ': ', node.successor) print('Predecessor of Node ', nodeId, ': ', node.successor)