Package twisted :: Package protocols :: Module msn :: Class DispatchClient
[frames | no frames]

Class DispatchClient

BaseProtocol --+            
               |            
        Protocol --+        
                   |        
        LineReceiver --+    
                       |    
            MSNEventBase --+
                           |
                          DispatchClient


This class provides support for clients connecting to the dispatch server
Method Summary
  connectionMade(self)
Called when a connection is made.
  gotNotificationReferral(self, host, port)
called when we get a referral to the notification server.
  handle_CVR(self, params)
  handle_VER(self, params)
  handle_XFR(self, params)
    Inherited from MSNEventBase
  __init__(self)
  _createIDMapping(self, data)
return a unique transaction ID that is mapped internally to a deferred ..
  _fireCallback(self, id, *args)
Fire the callback for the given id if one exists and return 1, else return false
  _nextTransactionID(self)
return a usable transaction ID
  checkMessage(self, message)
process received messages to check for file invitations and typing notifications and other control type messages
  connectionLost(self, reason)
  gotBadLine(self, line, why)
called when a handler notifies me that this line is broken
  gotError(self, errorCode)
called when the server sends an error which is not in response to a sent command (ie.
  gotMessage(self, message)
called when we receive a message - override in notification and switchboard clients
  handle_MSG(self, params)
  handle_UNKNOWN(self, cmd, params)
implement me in subclasses if you want to handle unknown events
  lineReceived(self, line)
Override this for when each line is received.
  rawDataReceived(self, data)
Override this for when raw data is received.
    Inherited from LineReceiver
  clearLineBuffer(self)
Clear buffered data.
  dataReceived(self, data)
Protocol.dataReceived.
  lineLengthExceeded(self, line)
Called when the maximum line length has been reached.
  sendLine(self, line)
Sends a line to the other end of the connection.
  setLineMode(self, extra)
Sets the line-mode of this receiver.
  setRawMode(self)
Sets the raw mode of this receiver.
    Inherited from Protocol
  connectionFailed(self)
(Deprecated)
    Inherited from BaseProtocol
  makeConnection(self, transport)
Make a connection to a transport and a server.

Instance Variable Summary
str userHandle: your user handle (passport) needed before connecting.

Class Variable Summary
    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

connectionMade(self)

Called when a connection is made.

This may be considered the initializer of the protocol, because it is called when the connection is completed. For clients, this is called once the connection to the server has been established; for servers, this is called after an accept() call stops blocking and a socket has been received. If you need to send any greeting or initial message, do it here.
Overrides:
twisted.protocols.msn.MSNEventBase.connectionMade (inherited documentation)

gotNotificationReferral(self, host, port)

called when we get a referral to the notification server.
Parameters:
host - the notification server's hostname
port - the port to connect to

Instance Variable Details

userHandle

your user handle (passport) needed before connecting.
Type:
str
Value:
''                                                                     

Generated by Epydoc 2.0 on Sat May 15 20:08:13 2004 http://epydoc.sf.net