twisted.test.test_tcp.MyClientFactory(MyProtocolFactoryMixin, protocol.ClientFactory) class documentationtwisted.test.test_tcp
(View In Hierarchy)
Known subclasses: twisted.test.test_tcp.ClientStartStopFactory
Client factory which creates AccumulatingProtocol
instances.
| Method | __init__ | Undocumented | 
| Method | clientConnectionFailed | Called when a connection has failed to connect. | 
| Method | clientConnectionLost | Called when an established connection is lost. | 
| Method | stopFactory | This will be called before I stop listening on all Ports/Connectors. | 
Inherited from MyProtocolFactoryMixin:
| Instance Variable | protocolFactory | Factory for protocols - takes the place of the typical protocolattribute of factories (but that name is used by this
class for something else). (type: no-argument callable) | 
| Instance Variable | protocolConnectionMade | When an instance of AccumulatingProtocolis connected, if this is notNone,
theDeferredwill 
be called back with the protocol instance and the attribute set toNone. (type:Noneordefer.Deferred) | 
| Instance Variable | protocolConnectionLost | When an instance of AccumulatingProtocolis created, this will be set as itsclosedDeferredattribute 
and then this attribute will be set toNoneso thedefer.Deferredis not used by more than one protocol. (type:Noneordefer.Deferred) | 
| Instance Variable | protocol | The most recently created AccumulatingProtocolinstance which was returned frombuildProtocol. | 
| Instance Variable | called | A counter which is incremented each time buildProtocolis 
called. (type:int) | 
| Instance Variable | peerAddresses | A listof the addresses passed tobuildProtocol. | 
| Method | buildProtocol | Create a AccumulatingProtocoland set it up to be able to perform callbacks. | 
Inherited from ClientFactory:
| Method | startedConnecting | Called when a connection has been started. | 
Inherited from Factory (via ClientFactory):
| Class Method | forProtocol | Create a factory for the given protocol. | 
| Method | logPrefix | Describe this factory for log messages. | 
| Method | doStart | Make sure startFactory is called. | 
| Method | doStop | Make sure stopFactory is called. | 
| Method | startFactory | This will be called before I begin listening on a Port or Connector. | 
| Method | buildProtocol | Create an instance of a subclass of Protocol. | 
Called when a connection has failed to connect.
It may be useful to call connector.connect() - this will reconnect.
Called when an established connection is lost.
It may be useful to call connector.connect() - this will reconnect.
This will be called before I stop listening on all Ports/Connectors.
This can be overridden to perform 'shutdown' tasks such as disconnecting database connections, closing files, etc.
It will be called, for example, before an application shuts down, if it was connected to a port. User code should not call this function directly.