[−][src]Struct cjdns_sniff::Sniffer
Wraps connection to cjdns admin interface and allows to send and receive messages of a certain type.
Implementations
impl Sniffer
[src]
pub async fn sniff_traffic(
conn: Connection,
content_type: ContentType
) -> Result<Self, ConnectError>
[src]
conn: Connection,
content_type: ContentType
) -> Result<Self, ConnectError>
Create new Sniffer
instance by connecting to a cjdns node.
pub async fn send<'_, '_>(
&'_ mut self,
msg: Message,
dest: Option<&'_ str>
) -> Result<(), SendError>
[src]
&'_ mut self,
msg: Message,
dest: Option<&'_ str>
) -> Result<(), SendError>
Send a message. Destination is an optional argument, if None
, localhost is used.
pub async fn receive<'_>(&'_ mut self) -> Result<Message, ReceiveError>
[src]
Receive a message.
pub async fn disconnect<'_>(&'_ mut self) -> Result<(), ConnectError>
[src]
Disconnect from cjdns router. Failing to do so would result in a stale UDP connection on router side. Though, this connection will be automatically reused on next connect.
Auto Trait Implementations
impl !RefUnwindSafe for Sniffer
impl Send for Sniffer
impl Sync for Sniffer
impl Unpin for Sniffer
impl !UnwindSafe for Sniffer
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,