Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Mirror
sjrpc
Commits
8130579c
Commit
8130579c
authored
Dec 29, 2010
by
Antoine Millet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated documentation.
parent
02bfc336
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
2 deletions
+9
-2
sjrpc/utils/handlers.py
sjrpc/utils/handlers.py
+6
-2
sjrpc/utils/proxies.py
sjrpc/utils/proxies.py
+3
-0
No files found.
sjrpc/utils/handlers.py
View file @
8130579c
...
...
@@ -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
...
...
sjrpc/utils/proxies.py
View file @
8130579c
...
...
@@ -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
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment