Package twisted :: Package protocols :: Module basic :: Class LineOnlyReceiver |
[frames | no frames]

## Class LineOnlyReceiver

    BaseProtocol --+
                   |
            Protocol --+
                       |
                      LineOnlyReceiver

Known Subclasses:
  `POP3`, `POP3Client`

A protocol that receives only lines.

This is purely a speed optimisation over LineReceiver, for the cases that raw mode is known to be unnecessary.

Method Summary
| ``dataReceived`(self, data)` Protocol.dataReceived.
| ``lineLengthExceeded`(self, line)` Called when the maximum line length has been reached.
| ``lineReceived`(self, line)` Override this for when each line is received.
| ``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
`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

### dataReceived(self, data) Protocol.dataReceived. Translates bytes into lines, and calls lineReceived. Overrides: `twisted.internet.protocol.Protocol.dataReceived`

### lineLengthExceeded(self, line) Called when the maximum line length has been reached. Override if it needs to be dealt with in some special way.

### lineReceived(self, line) Override this for when each line is received.

### sendLine(self, line) Sends a line to the other end of the connection.

Class Variable Details

    ### _buffer Type: `str` Value:
        ''

    ### delimiter Type: `str` Value:
        '''\r
        '''

    ### MAX_LENGTH Type: `int` Value:
        16384

Generated by Epydoc 2.0 on Sat Oct 25 00:55:12 2003 | http://epydoc.sf.net