feat:add raw PeerID to RPC interface (#7514)

* add raw PeerID to rpc interface

* use snake_case

* add peer_id to doc

* pass peer_id only and use peer_id_t and base64 encoding when passing peer_id to stat

* clang format

* fix dangling pointer

* remove std::optional

* clean up tr_peerMsgs constructor

* move b64encode to rpc

* just use constructor

* Update libtransmission/peer-msgs.cc

Co-authored-by: Yat Ho <lagoho7@gmail.com>

---------

Co-authored-by: Yat Ho <lagoho7@gmail.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
This commit is contained in:
cdowen
2025-11-08 21:47:40 +08:00
committed by GitHub
parent b0b8902198
commit 5db90f9ed9
8 changed files with 40 additions and 19 deletions

View File

@@ -326,6 +326,7 @@ Files are returned in the order they are laid out in the torrent. References to
| `isUTP` | boolean | tr_peer_stat
| `peerIsChoked` | boolean | tr_peer_stat
| `peerIsInterested` | boolean | tr_peer_stat
| `peer_id` | string | tr_peer_stat
| `port` | number | tr_peer_stat
| `progress` | double | tr_peer_stat
| `rateToClient` (B/s) | number | tr_peer_stat