Server now binds on both IPv4 (0.0.0.0) and IPv6 (::) by default. Uses tokio::select! to accept from whichever listener has a connection. New flags: --listen <addr> IPv4 listen address (default: 0.0.0.0, "none" to disable) --listen6 <addr> IPv6 listen address (default: ::, "none" to disable) Examples: btest -s # listen on both v4 and v6 btest -s --listen6 none # IPv4 only btest -s --listen none # IPv6 only btest -s --listen 192.168.1.1 # specific IPv4 address Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -8,7 +8,7 @@ async fn start_test_server(port: u16, auth_user: Option<&str>, auth_pass: Option
|
||||
let user = auth_user.map(String::from);
|
||||
let pass = auth_pass.map(String::from);
|
||||
tokio::spawn(async move {
|
||||
let _ = btest_rs::server::run_server(port, user, pass, false).await;
|
||||
let _ = btest_rs::server::run_server(port, user, pass, false, Some("127.0.0.1".into()), None).await;
|
||||
});
|
||||
tokio::time::sleep(Duration::from_millis(100)).await;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user