pub struct IpStackUdpStream { /* private fields */ }
Implementations§
Source§impl IpStackUdpStream
impl IpStackUdpStream
pub fn new( src_addr: SocketAddr, dst_addr: SocketAddr, pkt_sender: Sender<NetworkPacket>, mtu: u16, udp_timeout: Duration, ) -> Self
pub async fn recv(&self) -> Result<Bytes>
pub async fn send(&self, bts: &[u8]) -> Result<()>
pub fn local_addr(&self) -> SocketAddr
pub fn peer_addr(&self) -> SocketAddr
Trait Implementations§
Auto Trait Implementations§
impl Freeze for IpStackUdpStream
impl RefUnwindSafe for IpStackUdpStream
impl Send for IpStackUdpStream
impl Sync for IpStackUdpStream
impl Unpin for IpStackUdpStream
impl UnwindSafe for IpStackUdpStream
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more