Package twisted :: Package protocols :: Module sip :: Class MessagesParser
[show private | hide private]
[frames | no frames]

Class MessagesParser

BaseProtocol --+        
               |        
        Protocol --+    
                   |    
        LineReceiver --+
                       |
                      MessagesParser


A SIP messages parser.

Expects dataReceived, dataDone repeatedly, in that order. Shouldn't be connected to actual transport.
Method Summary
  __init__(self, messageReceivedCallback)
  clearLineBuffer(self)
Clear buffered data. (inherited from LineReceiver)
  connectionFailed(self)
(Deprecated) (inherited from Protocol)
  connectionLost(self, reason)
Called when the connection is shut down. (inherited from Protocol)
  connectionMade(self)
Called when a connection is made. (inherited from BaseProtocol)
  dataDone(self)
  dataReceived(self, data)
Protocol.dataReceived.
  handleFirstLine(self, line)
Expected to create self.message.
  invalidMessage(self)
  lineLengthExceeded(self)
  lineReceived(self, line)
Override this for when each line is received.
  makeConnection(self, transport)
Make a connection to a transport and a server. (inherited from BaseProtocol)
  messageDone(self, remainingData)
  rawDataReceived(self, data)
Override this for when raw data is received.
  reset(self, remainingData)
  sendLine(self, line)
Sends a line to the other end of the connection. (inherited from LineReceiver)
  setLineMode(self, extra)
Sets the line-mode of this receiver. (inherited from LineReceiver)
  setRawMode(self)
Sets the raw mode of this receiver. (inherited from LineReceiver)

Class Variable Summary
int acceptRequests
int acceptResponses
str state
str version

Method Details

dataReceived(self, data)

Protocol.dataReceived. Translates bytes into lines, and calls lineReceived (or rawDataReceived, depending on mode.)
Overrides:
twisted.protocols.basic.LineReceiver.dataReceived (inherited documentation)

handleFirstLine(self, line)

Expected to create self.message.

lineReceived(self, line)

Override this for when each line is received.
Overrides:
twisted.protocols.basic.LineReceiver.lineReceived (inherited documentation)

rawDataReceived(self, data)

Override this for when raw data is received.
Overrides:
twisted.protocols.basic.LineReceiver.rawDataReceived (inherited documentation)

Class Variable Details

acceptRequests

Type:
int
Value:
1                                                                      

acceptResponses

Type:
int
Value:
1                                                                      

state

Type:
str
Value:
'firstline'                                                            

version

Type:
str
Value:
'SIP/2.0'                                                              

Generated by Epydoc 1.1 on Fri Jun 27 03:48:37 2003 http://epydoc.sf.net