twisted.test.test_tcp.MyProtocolFactoryMixin(object) class documentationtwisted.test.test_tcp
(View In Hierarchy)
Known subclasses: twisted.test.test_tcp.MyClientFactory, twisted.test.test_tcp.MyServerFactory
Mixin for factories which create AccumulatingProtocol
instances.
| 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 | __init__ | Undocumented | 
| Method | buildProtocol | Create a AccumulatingProtocoland set it up to be able to perform callbacks. | 
protocol attribute of factories (but that name is used by this
class for something else). (type: no-argument callable)
  AccumulatingProtocol
is connected, if this is not None,
the Deferred will 
be called back with the protocol instance and the attribute set to None. (type: None
or defer.Deferred)
  AccumulatingProtocol
is created, this will be set as its closedDeferred attribute 
and then this attribute will be set to None
so the defer.Deferred
is not used by more than one protocol. (type: None
or defer.Deferred)
  AccumulatingProtocol
instance which was returned from buildProtocol.
  Create a AccumulatingProtocol
and set it up to be able to perform callbacks.