felixfaisal opened a new pull request, #2923: URL: https://github.com/apache/iggy/pull/2923
## Which issue does this PR close? Closes #2882 ## Rationale Server address validation previously required a literal socket address, preventing the use of DNS hostnames. This change allows hostnames (e.g., `localhost:8080`) in addition to IP addresses. ## What changed? Server address validation previously relied on `SocketAddr` parsing, which only accepts literal IP addresses and rejected DNS hostnames (e.g., `localhost:8080`). This prevented using hostnames when configuring client connections. Validation now uses `ToSocketAddrs`, which performs address resolution and returns the list of socket addresses for a given host. `TcpStream::connect(...)` already performs this resolution internally and attempts to connect to each resolved address. ## Local Execution - Passed - Pre-commit hooks ran ## AI Usage If AI tools were used, please answer: 1. Which tools? ChatGPT free version 2. Scope of usage? Write documentations like comments 3. How did you verify the generated code works correctly? - I built the code using `cargo build` - I ran the unit tests under `TCPConfigBuilder` and added an additional unit test, also modifying another - I then ran the server and ran the examples 4. Can you explain every line of the code if asked? Yup -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
