mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-04-02 02:35:31 +00:00
udp load test: fix ipv6 issues, improve documentation
This commit is contained in:
parent
18635bf26c
commit
5a34bd4b81
2 changed files with 17 additions and 26 deletions
|
|
@ -72,25 +72,18 @@ fn run(config: Config) -> ::anyhow::Result<()> {
|
|||
let (sender, receiver) = unbounded();
|
||||
let port = config.network.first_port + (i as u16);
|
||||
|
||||
let addr = if config.network.multiple_client_ips {
|
||||
let ip = if config.network.ipv6_client {
|
||||
// FIXME: test ipv6
|
||||
Ipv6Addr::new(0, 0, 0, 0, 0, 0, 0, 1 + i as u16).into()
|
||||
} else {
|
||||
Ipv4Addr::new(127, 0, 0, 1 + i).into()
|
||||
};
|
||||
|
||||
SocketAddr::new(ip, port)
|
||||
let ip = if config.server_address.is_ipv6() {
|
||||
Ipv6Addr::LOCALHOST.into()
|
||||
} else {
|
||||
let ip = if config.network.ipv6_client {
|
||||
Ipv6Addr::LOCALHOST.into()
|
||||
if config.network.multiple_client_ipv4s {
|
||||
Ipv4Addr::new(127, 0, 0, 1 + i).into()
|
||||
} else {
|
||||
Ipv4Addr::LOCALHOST.into()
|
||||
};
|
||||
|
||||
SocketAddr::new(ip, port)
|
||||
}
|
||||
};
|
||||
|
||||
let addr = SocketAddr::new(ip, port);
|
||||
|
||||
request_senders.push(sender);
|
||||
|
||||
let config = config.clone();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue