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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user