~cbehrens/nova/lp844160-build-works-with-zones

« back to all changes in this revision

Viewing changes to vendor/Twisted-10.0.0/doc/core/howto/listings/pb/pb3server.py

  • Committer: Jesse Andrews
  • Date: 2010-05-28 06:05:26 UTC
  • Revision ID: git-v1:bf6e6e718cdc7488e2da87b21e258ccc065fe499
initial commit

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/env python
 
2
 
 
3
# Copyright (c) 2009 Twisted Matrix Laboratories.
 
4
# See LICENSE for details.
 
5
 
 
6
from twisted.spread import pb
 
7
from twisted.internet import reactor
 
8
        
 
9
class One(pb.Root):
 
10
    def remote_takeTwo(self, two):
 
11
        print "received a Two called", two
 
12
        print "telling it to print(12)"
 
13
        two.callRemote("print", 12)
 
14
 
 
15
reactor.listenTCP(8800, pb.PBServerFactory(One()))
 
16
reactor.run()