Home | Trees | Index | Help |
|
---|
Package twisted :: Package protocols :: Module sip :: 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)
| |
dataDone(self)
| |
Protocol.dataReceived. | |
Expected to create self.message. | |
invalidMessage(self)
| |
Called when the maximum line length has been reached. | |
Override this for when each line is received. | |
messageDone(self,
remainingData)
| |
Override this for when raw data is received. | |
reset(self,
remainingData)
| |
Inherited from LineReceiver | |
Clear buffered data. | |
Sends a line to the other end of the connection. | |
Sets the line-mode of this receiver. | |
Sets the raw mode of this receiver. | |
Inherited from Protocol | |
(Deprecated) | |
Called when the connection is shut down. | |
Inherited from BaseProtocol | |
Called when a connection is made. | |
Make a connection to a transport and a server. |
Class Variable Summary | |
---|---|
int |
acceptRequests = 1 |
int |
acceptResponses = 1 |
int |
debug = 0 |
str |
state = 'firstline'
|
str |
version = 'SIP/2.0'
|
Inherited from LineReceiver | |
str |
_LineReceiver__buffer = ''
|
str |
delimiter : The line-ending delimiter to use. |
int |
line_mode = 1 |
int |
MAX_LENGTH : The maximum length of a line to allow (If a sent line is longer than
this, the connection is dropped). |
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 (or rawDataReceived, depending on mode.)
|
handleFirstLine(self, line)Expected to create self.message. |
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.
|
rawDataReceived(self, data)Override this for when raw data is received.
|
Class Variable Details |
---|
acceptRequests
|
acceptResponses
|
debug
|
state
|
version
|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.0 on Sat May 15 20:08:17 2004 | http://epydoc.sf.net |