pub struct IcmpSocket { /* private fields */ }Expand description
Synchronous ICMP socket.
Implementations§
Source§impl IcmpSocket
impl IcmpSocket
Sourcepub fn new(config: &IcmpConfig) -> Result<Self>
pub fn new(config: &IcmpConfig) -> Result<Self>
Create a new synchronous ICMP socket.
Sourcepub fn local_addr(&self) -> Result<SocketAddr>
pub fn local_addr(&self) -> Result<SocketAddr>
Retrieve the local address.
Sourcepub fn socket_type(&self) -> IcmpSocketType
pub fn socket_type(&self) -> IcmpSocketType
Return the socket type.
Sourcepub fn socket_family(&self) -> SocketFamily
pub fn socket_family(&self) -> SocketFamily
Return the socket family.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for IcmpSocket
impl RefUnwindSafe for IcmpSocket
impl Send for IcmpSocket
impl Sync for IcmpSocket
impl Unpin for IcmpSocket
impl UnwindSafe for IcmpSocket
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