~certify-web-dev/twisted/certify-trunk

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2007-01-17 14:52:35 UTC
  • mfrom: (1.1.5 upstream) (2.1.2 etch)
  • Revision ID: james.westby@ubuntu.com-20070117145235-btmig6qfmqfen0om
Tags: 2.5.0-0ubuntu1
New upstream version, compatible with python2.5.

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
 
12
12
class IFingerService(Interface):
13
13
 
14
 
    def getUser(self, user):
 
14
    def getUser(user):
15
15
        """Return a deferred returning a string"""
16
16
 
17
 
    def getUsers(self):
 
17
    def getUsers():
18
18
        """Return a deferred returning a list of strings"""
19
19
 
20
20
 
21
21
class IFingerFactory(Interface):
22
22
 
23
 
    def getUser(self, user):
 
23
    def getUser(user):
24
24
        """Return a deferred returning a string"""
25
25
 
26
 
    def buildProtocol(self, addr):
 
26
    def buildProtocol(addr):
27
27
        """Return a protocol returning a string"""
28
28
 
29
29
class FingerProtocol(basic.LineReceiver):
64
64
    def dataReceived(self, data):
65
65
        self.buf.append(data)
66
66
 
67
 
    def connectionLost(self):
 
67
    def connectionLost(self, reason):
68
68
        self.factory.gotData(''.join(self.buf))
69
69
 
70
70
class FingerClientFactory(protocol.ClientFactory):