feat(lib): report each finished upload's rate to the server

The speed other users see for us in `user` lookups and in the server's
own ranking comes from SendUploadSpeed (code 121), which the client
never sent, so it read zero however much we served. Each completed
upload now reports its measured bytes per second, as Nicotine+ and
slskd do.
This commit is contained in:
Michel de Graaf
2026-09-07 18:02:00 +02:00
parent b5dcef589c
commit dff19370d5
4 changed files with 50 additions and 2 deletions
+1
View File
@@ -252,6 +252,7 @@ impl Message {
100 => Ok("AcceptChildren"),
102 => Ok("PossibleParents"),
104 => Ok("WishlistInterval"),
121 => Ok("SendUploadSpeed"),
160 => Ok("ExcludedSearchPhrases"),
1001 => Ok("CantConnectToPeer"),
_ => Err(Error(format!("Unknown server message code: {code}"))),