Re: [libtorrent] How to tell which peer sent the piece?
Brought to you by:
arvidn
From: Steve W <s.w...@gm...> - 2015-01-25 01:57:07
|
> On 2015-01-24 03:35, Steve W wrote: > > > > Hi > > > > I see that the ‘piece_finished_alert’ is posted each time a piece is > > completed. Is there a way to find out which peer was the sender of a > > piece? The alert seems to provide the piece index and the torrent > > handle, but is there a way to trace back to who the peer is? > > A piece is often downloaded from multiple peers. You'd have to > listen for block_finished_alert, which derives from peer_alert > which includes the IP,port and the peer-id of the peer. > > Note that if a piece hash fails, you will receive multiple > block_finished_alert for the same block. Thank you, Arvid. Steve > > > -- > Arvid Norberg |