Class t.w.p.m.MSNMessage:

Part of twisted.words.protocols.msn View Source View In Hierarchy

I am the class used to represent an 'instant' message.
Instance VariablesuserHandleThe user handle (passport) of the sender (this is only used when receiving a message)
screenNameThe screen name of the sender (this is only used when receiving a message)
messageThe message
headersThe message headers (type: dict )
lengthThe message length (including headers and line endings)
ackThis variable is used to tell the server how to respond once the message has been sent. If set to MESSAGE_ACK (default) the server will respond with an ACK upon receiving the message, if set to MESSAGE_NACK the server will respond with a NACK upon failure to receive the message. If set to MESSAGE_ACK_NONE the server will do nothing. This is relevant for the return value of SwitchboardClient.sendMessage (which will return a Deferred if ack is set to either MESSAGE_ACK or MESSAGE_NACK and will fire when the respective ACK or NACK is received). If set to MESSAGE_ACK_NONE sendMessage will return None.
Method __init__ Undocumented
Method _calcMessageLen used to calculte the number to send
Method setHeader set the desired header
Method getHeader get the desired header value
Method hasHeader check to see if the desired header exists
Method getMessage return the message - not including headers
Method setMessage set the message text
def __init__(self, length=0, userHandle='', screenName='', message=''): (source)
Undocumented
def _calcMessageLen(self): (source)
used to calculte the number to send as the message length when sending a message.
def setHeader(self, header, value): (source)
set the desired header
def getHeader(self, header): (source)
get the desired header value
RaisesKeyErrorif no such header exists.
def hasHeader(self, header): (source)
check to see if the desired header exists
def getMessage(self): (source)
return the message - not including headers
def setMessage(self, message): (source)
set the message text
API Documentation for twisted, generated by pydoctor.