t.w.p.m.MSNMessage : class documentation

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

I am the class used to represent an 'instant' message.
Instance Variable userHandle The user handle (passport) of the sender (this is only used when receiving a message)
Instance Variable screenName The screen name of the sender (this is only used when receiving a message)
Instance Variable message The message
Instance Variable headers The message headers (type: dict)
Instance Variable length The message length (including headers and line endings)
Instance Variable ack This 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 setHeader set the desired header
Method getHeader get the desired header value @raise KeyError: if no such header exists.
Method hasHeader check to see if the desired header exists
Method getMessage return the message - not including headers
Method setMessage set the message text
Method _calcMessageLen used to calculte the number to send as the message length when sending a message.
userHandle =
The user handle (passport) of the sender (this is only used when receiving a message)
screenName =
The screen name of the sender (this is only used when receiving a message)
message =
The message
headers =
The message headers (type: dict)
length =
The message length (including headers and line endings)
ack =
This 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.
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 at 2014-05-12 18:27:00.