fix: use u16 for listen port end-to-end

Port numbers are 16-bit; the codebase had listen_port/listener_port
typed as u32, inconsistent with PeerAddress.port (already u16).
Migrate the type all the way through the CLI, config, ClientSettings,
Client, ServerActor, and the listener entry point. The wire format is
preserved: build_set_wait_port_message now takes u16 and widens to u32
via .into() before write_int32. Also rename DEFALT_LISTEN_PORT to
DEFAULT_LISTEN_PORT.
This commit is contained in:
michel
2026-04-26 17:20:45 +02:00
parent 44846cdfa8
commit e0218b2433
6 changed files with 11 additions and 13 deletions
+1 -1
View File
@@ -4,7 +4,7 @@ pub struct SearchConfig {
pub server_host: String,
pub server_port: u16,
pub enable_listener: bool,
pub listener_port: u32,
pub listener_port: u16,
pub query: String,
pub timeout: u64,
pub download_dir: String,