J'ai un torrent multi-fichiers (3 fichiers). Je me suis abonné à read_piece_alert comme expliqué here.libtorrent alerts - read_piece_alert
std::vector<alert*> alerts;
ses.pop_alerts(&alerts);
for (alert* i : alerts) {
switch (a->type()) {
case read_piece_alert::alert_type:
{
read_piece_alert* p = (read_piece_alert*)a;
if (p->ec) {
// read_piece failed
break;
}
// use p
break;
}
case file_renamed_alert::alert_type:
{
// etc...
}
}
}
Comment puis-je savoir à quel fichier la pièce appartient dans le torrent multi-fichier?
Par exemple, mon torrent multi-fichiers a un .AVI, .TXT et .JPG. Y a-t-il une sorte d'index pour savoir à quel fichier appartient la pièce?