Thanks Arvid & Steven,
By 'part of libtorrent', do you mean that it is an actual plugin which runs
on the libtorrent thread?
if so, then yes, if no, then I am not sure. We are certainly not trying to
add pieces on a peer from the user thread.
On the proposed solution of peer_connection::incoming_piece(peer_request):
1) are you sure it will not be a problem that libtorrent has not requested
this piece, and thus that peer_request will not be familiar?
2) are you sure that it will not be a problem that we are talking about a
full piece, not just a block, which is what peer_request typically
describes?
this otherwise looks like an excellent solution, so I hope it works.
ᐧ
Post by Steven SilotiPost by Arvid NorbergPost by Bedeho MenderThere is no direct way to write a piece to disk from a peer_plugin, you
seem to have to use torrent_handle::add_piece(..). However, this leave
no
Post by Arvid NorbergPost by Bedeho Menderlink between the piece and the peer, and hence the
peer_plugin::on_piece_pass/fail cannot be invoked.
Is there a way to add a full pieces from a peer such that the relevant
peer_plugin::on_piece_pass/fail are actually called?
The way this used to work was for the plugin to call
peer_connection::incoming_piece(). With Steven's cleanup of the plugin
interface, that function isn't exposed. It should probably be added to
peer_connection_handle to support this use case.
--
Arvid Norberg
As long as you're building your plugin as part of libtorrent you can use
peer_connection_handle::native_handle() to gain access to
peer_connection::incoming_piece(). If you want to build your plugin
separately then incoming_piece will need to be added to
peer_connection_handle.
------------------------------------------------------------
------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
_______________________________________________
Libtorrent-discuss mailing list
https://lists.sourceforge.net/lists/listinfo/libtorrent-discuss