twisted.protocols.ident.IdentServer

Package twisted :: Package protocols :: Module ident :: Class IdentServer |
[frames | no frames]

## Class IdentServer

    BaseProtocol --+
                   |
            Protocol --+
                       |
        LineOnlyReceiver --+
                           |
                          IdentServer

The Identification Protocol (a.k.a., "ident", a.k.a., "the Ident Protocol") provides a means to determine the identity of a user of a particular TCP connection. Given a TCP port number pair, it returns a character string which identifies the owner of that connection on the server's system.

Server authors should subclass this class and override the lookup method. The default implementation returns an UNKNOWN-ERROR response for every query.

Method Summary
| `_cbLookup(self, (sysName, userId), sport, cport)`
| `_ebLookup(self, failure, sport, cport)`
| `invalidQuery(self)`
| ``lineReceived`(self, line)` Override this for when each line is received.
| ``lookup`(self, serverAddress, clientAddress)` Lookup user information about the specified address pair.
| `validQuery(self, portOnServer, portOnClient)`
Inherited from LineOnlyReceiver
| ``dataReceived`(self, data)` Protocol.dataReceived.
| ``lineLengthExceeded`(self, line)` Called when the maximum line length has been reached.
| ``sendLine`(self, line)` Sends a line to the other end of the connection.
Inherited from Protocol
| ``connectionFailed`(self)` (Deprecated)
| ``connectionLost`(self, reason)` Called when the connection is shut down.
Inherited from BaseProtocol
| ``connectionMade`(self)` Called when a connection is made.
| ``makeConnection`(self, transport)` Make a connection to a transport and a server.

Class Variable Summary
Inherited from LineOnlyReceiver
`str` | `_buffer` = `''`
`str` | `delimiter` = `'\r\n'`
`int` | `MAX_LENGTH` = 16384
Inherited from Protocol
`tuple` | `__implements__` = `(<class twisted.internet.interfaces.IPr...`
Inherited from BaseProtocol
`int` | `connected` = 0
`NoneType` | `transport` = None

Method Details

### lineReceived(self, line) Override this for when each line is received. Overrides: `twisted.protocols.basic.LineOnlyReceiver.lineReceived` (inherited documentation)

### lookup(self, serverAddress, clientAddress) Lookup user information about the specified address pair. Return value should be a two-tuple of system name and username. Acceptable values for the system name may be found in the "SYSTEM NAMES" section of RFC 1340 or its successor. This method may also raise any IdentError subclass (or IdentError itself) to indicate user information will not be provided for the given query. A Deferred may also be returned.

Generated by Epydoc 2.0 on Sat May 15 20:08:44 2004 | http://epydoc.sf.net