Package pyfics :: Module protocols :: Class ChangingLineReceiver
[hide private]

Class ChangingLineReceiver

source code

twisted.internet.protocol.BaseProtocol --+            
                                         |            
        twisted.internet.protocol.Protocol --+        
                                             |        
      twisted.protocols.basic.LineOnlyReceiver --+    
                                                 |    
                                 SmartLineReceiver --+
                                                     |
                                                    ChangingLineReceiver
Known Subclasses:
IcsProtocol

A protocol that can receive only lines. It can handle data with changing line delimiters.

Instance Methods [hide private]
 
dataReceived(self, data)
Translates bytes into lines, and calls lineReceived.
source code

Inherited from twisted.protocols.basic.LineOnlyReceiver: lineLengthExceeded, lineReceived, sendLine

Inherited from twisted.internet.protocol.Protocol: connectionLost

Inherited from twisted.internet.protocol.BaseProtocol: __providedBy__, connectionMade, makeConnection

Class Variables [hide private]
list delimiters = []
A list of delimiters.

Inherited from SmartLineReceiver: MAX_LENGTH, delimiter, linealike, rmlinealike

Inherited from twisted.protocols.basic.LineOnlyReceiver (private): _buffer

Inherited from twisted.internet.protocol.Protocol: __implemented__, __provides__

Inherited from twisted.internet.protocol.BaseProtocol: connected, transport

Method Details [hide private]

dataReceived(self, data)

source code 
Translates bytes into lines, and calls lineReceived. If data ends with any string in prompt add delimiter at the end. If promptremove is True, remove the used string from prompt.
Overrides: SmartLineReceiver.dataReceived
(inherited documentation)