Package viff :: Module runtime :: Class SelfShareExchanger
[hide private]
[frames] | no frames]

Class SelfShareExchanger

source code


Instance Methods [hide private]
 
__init__(self, id, factory) source code
 
stringReceived(self, program_counter, data_type, data)
Called when a share is received.
source code
 
sendData(self, program_counter, data_type, data)
Send data to the self.id.
source code
 
loseConnection(self)
Disconnect this protocol instance.
source code

Inherited from ShareExchanger: connectionLost, connectionMade, sendShare

Inherited from twisted.protocols.basic.Int16StringReceiver: dataReceived, sendString

Inherited from twisted.internet.protocol.BaseProtocol: __providedBy__, makeConnection

Inherited from twisted.protocols.basic._PauseableMixin: pauseProducing, resumeProducing, stopProducing

Class Variables [hide private]

Inherited from twisted.protocols.basic.Int16StringReceiver: recvd

Inherited from twisted.internet.protocol.Protocol: __implemented__, __provides__

Inherited from twisted.internet.protocol.BaseProtocol: connected, transport

Inherited from twisted.protocols.basic._PauseableMixin: paused

Instance Variables [hide private]

Inherited from ShareExchanger: incoming_data, sent_packets

Method Details [hide private]

__init__(self, id, factory)
(Constructor)

source code 
Overrides: ShareExchanger.__init__

stringReceived(self, program_counter, data_type, data)

source code 

Called when a share is received.

The string received is unpacked into the program counter, and a data part. The data is passed the appropriate Deferred in self.incoming_data.

Overrides: twisted.protocols.basic.Int16StringReceiver.stringReceived

sendData(self, program_counter, data_type, data)

source code 
Send data to the self.id.
Overrides: ShareExchanger.sendData

loseConnection(self)

source code 
Disconnect this protocol instance.
Overrides: ShareExchanger.loseConnection