Skip to content

Commit

Permalink
Merge pull request #4 from rylev/udp-override
Browse files Browse the repository at this point in the history
UDP override
  • Loading branch information
rylev committed Jan 29, 2024
2 parents d796ad4 + cc1e62f commit 109efa1
Show file tree
Hide file tree
Showing 7 changed files with 524 additions and 207 deletions.
3 changes: 1 addition & 2 deletions crates/wasi/src/preview2/ctx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@ impl WasiCtxBuilder {
let mut network = DefaultNetwork::new();
network.allow_ip_name_lookup(allow_ip_name_lookup);
network.allow_tcp(tcp_addr_check);
network.allow_udp(udp_addr_check);

WasiCtx {
stdin,
Expand All @@ -288,7 +289,6 @@ impl WasiCtxBuilder {
insecure_random_seed,
wall_clock,
monotonic_clock,
udp_addr_check,
network: Box::new(network),
}
}
Expand All @@ -313,6 +313,5 @@ pub struct WasiCtx {
pub(crate) stdin: Box<dyn StdinStream>,
pub(crate) stdout: Box<dyn StdoutStream>,
pub(crate) stderr: Box<dyn StdoutStream>,
pub(crate) udp_addr_check: SocketAddrCheck,
pub(crate) network: Box<dyn Network>,
}
3 changes: 1 addition & 2 deletions crates/wasi/src/preview2/host/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@ pub(crate) mod ip_name_lookup;
pub(crate) mod network;
mod random;
pub(crate) mod tcp;
mod udp;
mod udp_create_socket;
pub(crate) mod udp;

0 comments on commit 109efa1

Please sign in to comment.