pyro - Python Pyro4, client dosent see name server which is created in server file -
i try create name server in server file pyro4.naming.startns() method.
my server file looks this:
my_object = myclass() daemon = pyro4.daemon() uri_deamon, ns, br = pyro4.naming.startns() uri = daemon.register(my_object) ns.nameserver.register("server", uri) daemon.requestloop()
and client:
ns = pyro4.locatens() uri = ns.lookup('server') my_object=pyro4.proxy(uri)
pyro4.locatens() never ends. after start server file. try execute "python -m pyro4.nsc list" , command never ends too.
have ideas wrong?
tomek.
solution:
i needed use pyro4.naming.startnsloop() instead of pyro4.naming.startns(). pyro4.naming.startnsloop should executed in thread.
Comments
Post a Comment