Skip to main content

wasmtime_wasi/p2/
udp.rs

1use crate::sockets::{SocketAddrCheck, SocketAddressFamily};
2use std::net::SocketAddr;
3use std::sync::Arc;
4
5pub struct IncomingDatagramStream {
6    pub(crate) inner: Arc<tokio::net::UdpSocket>,
7
8    /// If this has a value, the stream is "connected".
9    pub(crate) remote_address: Option<SocketAddr>,
10}
11
12pub struct OutgoingDatagramStream {
13    pub(crate) inner: Arc<tokio::net::UdpSocket>,
14
15    /// If this has a value, the stream is "connected".
16    pub(crate) remote_address: Option<SocketAddr>,
17
18    /// Socket address family.
19    pub(crate) family: SocketAddressFamily,
20
21    /// The check of allowed addresses
22    pub(crate) socket_addr_check: Option<SocketAddrCheck>,
23
24    /// Remaining number of datagrams permitted by most recent `check-send`
25    /// call.
26    pub(crate) check_send_permit_count: usize,
27}