3 # Copyright (c) Twisted Matrix Laboratories.
4 # See LICENSE for details.
6 from twisted.application import service, internet
7 from twisted.internet import reactor
8 from twisted.spread import pb
9 import copy2_classes # needed to get ReceiverPond registered with Jelly
11 class Receiver(pb.Root):
12 def remote_takePond(self, pond):
13 print " got pond:", pond
14 print " count %d" % pond.count()
15 return "safe and sound" # positive acknowledgement
16 def remote_shutdown(self):
19 application = service.Application("copy_receiver")
20 internet.TCPServer(8800, pb.PBServerFactory(Receiver())).setServiceParent(
21 service.IServiceCollection(application))