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

« back to all changes in this revision

Viewing changes to doc/howto/tutorial/listings/finger/finger04.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
from twisted.protocols import basic
 
3
 
3
4
class FingerProtocol(basic.LineReceiver):
4
5
    def lineReceived(self, user):
5
6
        self.transport.loseConnection()
 
7
 
6
8
class FingerFactory(protocol.ServerFactory):
7
9
    protocol = FingerProtocol
 
10
 
8
11
reactor.listenTCP(1079, FingerFactory())
9
12
reactor.run()