Closed whr819987540 closed 10 months ago
Are you looking for something like a seeding ratio?
Seeding ratio could help because if I know this, the number of bytes that a peer send to others will also be known. But it would be better if torrent could directly supply the number.
Bytes sent and uploaded by the local client are recorded. I'm not sure about bytes sent by each peer, but that data is only easy to track while the peer remains connected to our local client. Which is it that you're after?
As you said, I think 'Bytes sent and uploaded by the local client' is enough, which reflects how much the local client gets from others and does for others. For this purpose, which variable do you think is the most suitable? BytesRead and BytesWritten?
ConnStats.BytesWrittenData
is data uploaded to peers, I think that's the one you want. Similarly any of the BytesRead
fields for data received, depending on how specific you want to be.
I think this can be closed, the question was answered.
I would like to build a mechanism that rewards or punishes users based on how many bytes they receive from or send to other peers so that more users would be willing to keep seeding for a while after downloading. As for bytes received, it could be found through torrent.ConnStats.BytesRead. But how about bytes sent? When I am downloading, I could send to other peers as well. When I finish downloading and start seeding, I could also send to other peers.