Loading sjrpc/utils/handlers.py +6 −2 Original line number Diff line number Diff line Loading @@ -4,6 +4,9 @@ class RpcHandler(object): ''' Basic RPC functions handler. Derive this call in your handler and define some methods. All the defined methods (including privates) are available to your peer. ''' def __getitem__(self, name): Loading @@ -12,8 +15,9 @@ class RpcHandler(object): else: raise KeyError(name) # # Decorators: # def threadless(func): ''' Loading @@ -27,7 +31,7 @@ def threadless(func): def pure(func): ''' Function handler decorator -- the function is a pure fonction, caller will not pass :class:`RpcConnection` object in call parameters. not pass :class:`RpcConnection` object as first call parameters. ''' func.__pure__ = True Loading sjrpc/utils/proxies.py +3 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,9 @@ class ConnectionProxy(object): >>> proxy.unknown_function() [Traceback] NameError: remote name 'unknown_function' is not defined >>> proxy['myfunc']() # You can also use this syntax ... ''' def __init__(self, connection): Loading Loading
sjrpc/utils/handlers.py +6 −2 Original line number Diff line number Diff line Loading @@ -4,6 +4,9 @@ class RpcHandler(object): ''' Basic RPC functions handler. Derive this call in your handler and define some methods. All the defined methods (including privates) are available to your peer. ''' def __getitem__(self, name): Loading @@ -12,8 +15,9 @@ class RpcHandler(object): else: raise KeyError(name) # # Decorators: # def threadless(func): ''' Loading @@ -27,7 +31,7 @@ def threadless(func): def pure(func): ''' Function handler decorator -- the function is a pure fonction, caller will not pass :class:`RpcConnection` object in call parameters. not pass :class:`RpcConnection` object as first call parameters. ''' func.__pure__ = True Loading
sjrpc/utils/proxies.py +3 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,9 @@ class ConnectionProxy(object): >>> proxy.unknown_function() [Traceback] NameError: remote name 'unknown_function' is not defined >>> proxy['myfunc']() # You can also use this syntax ... ''' def __init__(self, connection): Loading