Package twisted :: Package internet :: Module protocol :: Class ClientFactory
[show private | hide private]
[frames | no frames]

Class ClientFactory

Factory --+
          |
         ClientFactory

Known Subclasses:
CollectorClient, CollectorClient, PBClientFactory, ReconnectingClientFactory, ScanFactory, ZenTcpClient

A Protocol factory for clients.

This can be used together with the various connectXXX methods in reactors.
Method Summary
  clientConnectionFailed(self, connector, reason)
Called when a connection has failed to connect.
  clientConnectionLost(self, connector, reason)
Called when an established connection is lost.
  startedConnecting(self, connector)
Called when a connection has been started.
Inherited from Factory: buildProtocol, doStart, doStop, startFactory, stopFactory

Class Variable Summary
Inherited from Factory: __implemented__, __providedBy__, __provides__, noisy, numPorts, protocol

Method Details

clientConnectionFailed(self, connector, reason)

Called when a connection has failed to connect.

It may be useful to call connector.connect() - this will reconnect.
Parameters:
reason
           (type=twisted.python.failure.Failure)

clientConnectionLost(self, connector, reason)

Called when an established connection is lost.

It may be useful to call connector.connect() - this will reconnect.
Parameters:
reason
           (type=twisted.python.failure.Failure)

startedConnecting(self, connector)

Called when a connection has been started.

You can call connector.stopConnecting() to stop the connection attempt.
Parameters:
connector - a Connector object.

Generated by Epydoc 2.1 on Thu Aug 16 09:55:14 2007 http://epydoc.sf.net