~certify-web-dev/twisted/certify-staging

« back to all changes in this revision

Viewing changes to doc/howto/tutorial/listings/finger/finger03.py

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2010-01-02 19:38:17 UTC
  • mfrom: (2.2.4 sid)
  • Revision ID: james.westby@ubuntu.com-20100102193817-jphp464ppwh7dulg
Tags: 9.0.0-1
* python-twisted: Depend on the python-twisted-* 9.0 packages.
* python-twisted: Depend on python-zope.interface only. Closes: #557781.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
from twisted.internet import protocol, reactor
 
2
 
2
3
class FingerProtocol(protocol.Protocol):
3
4
    def connectionMade(self):
4
5
        self.transport.loseConnection()
 
6
 
5
7
class FingerFactory(protocol.ServerFactory):
6
8
    protocol = FingerProtocol
 
9
 
7
10
reactor.listenTCP(1079, FingerFactory())
8
11
reactor.run()