[][src]Struct rust_ipv8::networking::NetworkSender

pub struct NetworkSender { /* fields omitted */ }

A NetworkSender is a wrapper for a sending udp socket.

Every Community gets one of these, there called 'endpoint'. A community can use it to send messages directed at other communities somewhere on the network.

Methods

impl NetworkSender[src]

pub fn new(sending_address: &Address) -> Result<Self, Box<dyn Error>>[src]

Creates a new NetworkSender object.

pub fn send(
    &self,
    address: &Address,
    packet: Packet
) -> Result<usize, Box<dyn Error>>
[src]

Sends a Packet to the specified address.

Auto Trait Implementations

impl Unpin for NetworkSender

impl Sync for NetworkSender

impl Send for NetworkSender

impl RefUnwindSafe for NetworkSender

impl UnwindSafe for NetworkSender

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]