pub struct RawSocket { /* private fields */ }Expand description
A raw IP socket.
This socket type intercepts all traffic for its protocol number, even if there are protocol-specific sockets connected or listening.
Implementations§
Source§impl RawSocket
impl RawSocket
Sourcepub fn send_blocking(&self, buf: &[u8]) -> Result<(), Error>
pub fn send_blocking(&self, buf: &[u8]) -> Result<(), Error>
Send the raw packet contained in buf over the network.
Sourcepub async fn send(&self, buf: &[u8]) -> Result<(), Error>
pub async fn send(&self, buf: &[u8]) -> Result<(), Error>
Send the raw packet contained in buf over the network.
Sourcepub fn recv_blocking(&self, buf: &mut [u8]) -> Result<usize, Error>
pub fn recv_blocking(&self, buf: &mut [u8]) -> Result<usize, Error>
Receive a raw packet into buf from the network.
Sourcepub async fn recv(&self, buf: &mut [u8]) -> Result<usize, Error>
pub async fn recv(&self, buf: &mut [u8]) -> Result<usize, Error>
Receive a raw packet into buf from the network.
Sourcepub fn recv_bytes_blocking(&self) -> Result<Bytes, Error>
pub fn recv_bytes_blocking(&self) -> Result<Bytes, Error>
Receive a raw packet into buf from the network.
Sourcepub async fn recv_bytes(&self) -> Result<Bytes, Error>
pub async fn recv_bytes(&self) -> Result<Bytes, Error>
Receive a raw packet into buf from the network.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RawSocket
impl RefUnwindSafe for RawSocket
impl Send for RawSocket
impl Sync for RawSocket
impl Unpin for RawSocket
impl UnsafeUnpin for RawSocket
impl UnwindSafe for RawSocket
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