Commits

Sven Hendriks committed 375065f

Added README.rst

Comments (0)

Files changed (1)

+Server
+------
+
+Here's a snippet for the server side of things::
+
+	from jrpc.server import serve
+
+	# the class whose methods we're going to expose
+	class Handler(object):
+		def sum(self, a, b):
+			a = int(a)
+			b = int(b)
+			return a + b
+	
+	serve(9000, Handler)
+
+Client
+------
+
+And here's a snippet for the client::
+
+	from jrpc.client import JRPCClient
+
+	c = JRPCClient('localhost', 9000)
+	sum = c.sum(1, 2)
+