Skip to content
Snippets Groups Projects
Commit 8130579c authored by Antoine Millet's avatar Antoine Millet
Browse files

Updated documentation.

parent 02bfc336
No related branches found
No related tags found
No related merge requests found
......@@ -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):
......@@ -12,8 +15,9 @@ class RpcHandler(object):
else:
raise KeyError(name)
#
# Decorators:
#
def threadless(func):
'''
......@@ -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
......
......@@ -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):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment