mapa17 / Eruliaf

A BitTorrent like overlay peer simulator
GNU General Public License v3.0
1 stars 0 forks source link

Add update to connection class #7

Closed mapa17 closed 12 years ago

mapa17 commented 12 years ago

Extend the connection class to support a stage 0 call on each iteration.

in an update() method the connection has to

evaluate the state of the connection ( chocked/unchocked, depending on interest )

calculate next upload and download bandwidth

There should be some kind of feedback to the peer class to notify about important changes in connection state. Like leafing peer, or a chock ( which results in a new TFT algo execution )

Up till now connection only returns the last uploadSpeed from the other peer ( Connection.getUploadRate() ) which is set to 0.