Created
May 1, 2011 18:34
-
-
Save joshmarshall/950719 to your computer and use it in GitHub Desktop.
Tornado RPC Example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from tornadorpc.xml import XMLRPCHandler | |
from tornadorpc import private, start_server | |
class Handler(XMLRPCHandler): | |
def add(self, x, y): | |
return x+y | |
def ping(self, obj): | |
return obj | |
@private | |
def private(self): | |
#should not get called | |
return False | |
start_server(Handler, port=8080) [/code] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment