mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-03-31 17:55:36 +00:00
udp: fix build failure; fix scripts/run-aquatic-udp.sh
This commit is contained in:
parent
a665b38536
commit
ce1c0b24c3
2 changed files with 10 additions and 6 deletions
|
|
@ -16,7 +16,9 @@ use crate::config::Config;
|
||||||
|
|
||||||
pub mod common;
|
pub mod common;
|
||||||
pub mod handlers;
|
pub mod handlers;
|
||||||
|
#[cfg(feature = "with-mio")]
|
||||||
pub mod network_mio;
|
pub mod network_mio;
|
||||||
|
#[cfg(feature = "with-io-uring")]
|
||||||
pub mod network_uring;
|
pub mod network_uring;
|
||||||
pub mod tasks;
|
pub mod tasks;
|
||||||
|
|
||||||
|
|
@ -107,8 +109,8 @@ pub fn run_inner(config: Config, state: State) -> ::anyhow::Result<()> {
|
||||||
request_sender,
|
request_sender,
|
||||||
response_receiver,
|
response_receiver,
|
||||||
num_bound_sockets,
|
num_bound_sockets,
|
||||||
)
|
);
|
||||||
} else if #[cfg(feature = "with-mio")] {
|
} else {
|
||||||
network_mio::run_socket_worker(
|
network_mio::run_socket_worker(
|
||||||
state,
|
state,
|
||||||
config,
|
config,
|
||||||
|
|
@ -116,9 +118,9 @@ pub fn run_inner(config: Config, state: State) -> ::anyhow::Result<()> {
|
||||||
request_sender,
|
request_sender,
|
||||||
response_receiver,
|
response_receiver,
|
||||||
num_bound_sockets,
|
num_bound_sockets,
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
)
|
);
|
||||||
})
|
})
|
||||||
.with_context(|| "spawn socket worker")?;
|
.with_context(|| "spawn socket worker")?;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,11 +2,13 @@
|
||||||
|
|
||||||
. ./scripts/env-native-cpu-without-avx-512
|
. ./scripts/env-native-cpu-without-avx-512
|
||||||
|
|
||||||
if [ "$1" != "mio" ] && [ "$1" != "glommio" ]; then
|
if [ "$1" != "mio" ] && [ "$1" != "glommio" ] && [ "$1" != "io-uring" ]; then
|
||||||
echo "Usage: $0 [mio|glommio] [ARGS]"
|
echo "Usage: $0 [mio|glommio|io-uring] [ARGS]"
|
||||||
else
|
else
|
||||||
if [ "$1" = "mio" ]; then
|
if [ "$1" = "mio" ]; then
|
||||||
cargo run --release --bin aquatic_udp -- "${@:2}"
|
cargo run --release --bin aquatic_udp -- "${@:2}"
|
||||||
|
elif [ "$1" = "io-uring" ]; then
|
||||||
|
cargo run --release --features "with-io-uring" --no-default-features --bin aquatic_udp -- "${@:2}"
|
||||||
else
|
else
|
||||||
cargo run --release --features "with-glommio" --no-default-features --bin aquatic_udp -- "${@:2}"
|
cargo run --release --features "with-glommio" --no-default-features --bin aquatic_udp -- "${@:2}"
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue