feat(shares): encode FileSearchResponse (peer code 9)

Add build_file_search_response + a borrowed FileEntry view: the zlib-compressed
reply advertising our matching shared files to a searcher. The payload is the
exact inverse of SearchResult::new_from_message (username, token, per-file
name/size/ext/attributes, slots, speed), compressed with the stored-block
encoder. Round-trip tested through the production decoder.
This commit is contained in:
michel
2026-07-19 18:35:11 +02:00
parent 7ff6ab9425
commit bcfe56e74f
2 changed files with 83 additions and 1 deletions
+3 -1
View File
@@ -7,7 +7,9 @@ mod transfer_response;
mod upload_failed;
// Re-export handlers
pub use file_search_response::FileSearchResponse;
pub use file_search_response::{
FileEntry, FileSearchResponse, build_file_search_response,
};
pub use get_share_file_list::GetShareFileList;
pub use peer_init::PeerInit;
pub use place_in_queue_response::PlaceInQueueResponse;