mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-04-02 10:45:30 +00:00
aquatic_ws: announce handler: update comments
This commit is contained in:
parent
982f3c8959
commit
fa82d93190
1 changed files with 3 additions and 2 deletions
|
|
@ -80,6 +80,8 @@ pub fn handle_announce_requests(
|
||||||
let torrent_data = torrents.entry(request.info_hash)
|
let torrent_data = torrents.entry(request.info_hash)
|
||||||
.or_default();
|
.or_default();
|
||||||
|
|
||||||
|
// TODO: insert peer, update stats etc
|
||||||
|
|
||||||
if let Some(offers) = request.offers {
|
if let Some(offers) = request.offers {
|
||||||
// if offers are set, fetch same number of peers, send offers to all of them
|
// if offers are set, fetch same number of peers, send offers to all of them
|
||||||
}
|
}
|
||||||
|
|
@ -131,8 +133,7 @@ pub fn handle_scrape_requests(
|
||||||
};
|
};
|
||||||
|
|
||||||
// If request.info_hashes is None, don't return scrape for all
|
// If request.info_hashes is None, don't return scrape for all
|
||||||
// torrents, even though that is done in reference server, it is
|
// torrents, even though reference server does it. It is too expensive.
|
||||||
// too expensive.
|
|
||||||
if let Some(info_hashes) = request.info_hashes {
|
if let Some(info_hashes) = request.info_hashes {
|
||||||
for info_hash in info_hashes {
|
for info_hash in info_hashes {
|
||||||
if let Some(torrent_data) = torrents.get(&info_hash){
|
if let Some(torrent_data) = torrents.get(&info_hash){
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue