you know..
i have three file that i want to creat my own registry server with one 
server and one client
please tell me that if i do right or wrong way.
----------------------------------------------------
my_registry.py:
    from rpyc.utils.registry import TCPRegistryServer

    def main():
        server = TCPRegistryServer("localhost", port=20202)
        print "Registry server is ready..."
        server.start()

    if __name__ == "__main__":
        main()
----------------------------------------------------
simpleServer.py:

import rpyc
from rpyc.utils.server import ThreadedServer
from rpyc.utils.registry import TCPRegistryClient

class ServerService(rpyc.Service):    

    def on_connect(self):
        print "connected"

    def on_disconnect(self):
        print "disconnected"


    def exposed_test1(self):
        print "test1"

if __name__ == "__main__":
    tcp_registrar = TCPRegistryClient("localhost", port=20202)
    server = ThreadedServer(ServerService, port=2014, 
registrar=tcp_registrar)
    print "Server is ready..."
    server.start()
----------------------------------------------------
simpleClient.py:

import rpyc
from rpyc.utils.registry import TCPRegistryClient

class ClientService(rpyc.Service):    
    def exposed_test1(self):
        print "test1: "


reg = TCPRegistryClient("localhost", port=20202)
conn = rpyc.connect("localhost", port=2014, service=ClientService)

rpyc.discover("Server", registrar=reg)

conn.close()
----------------------------------------------------
please guide me

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"rpyc" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to