twisted.words.protocols.msn.MSNMessage class documentationtwisted.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 calculate the number to send as the message length when sending a message. | 
used to calculate the number to send as the message length when sending a message.
get the desired header value
| Raises | KeyError | if no such header exists. |