import zerorpc
import time

class HelloRPC(object):
    def transfer(self, document):
        return "Document received, %s" % document
        s.stop()
    
    def receive(self, file):
        print 'server received, %s' % file
        return
        
s = zerorpc.Server(HelloRPC())
s.bind("tcp://0.0.0.0:4242")

print 'remote procedure call server started'
s.run()
