Skip to content

Instantly share code, notes, and snippets.

@joshmarshall
Created May 1, 2011 18:34
Show Gist options
  • Save joshmarshall/950719 to your computer and use it in GitHub Desktop.
Save joshmarshall/950719 to your computer and use it in GitHub Desktop.
Tornado RPC Example
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