[][src]Struct rust_ipv8::payloads::introductionresponsepayload::IntroductionResponsePayload

pub struct IntroductionResponsePayload {
    pub destination_address: Address,
    pub source_lan_address: Address,
    pub source_wan_address: Address,
    pub lan_introduction_address: Address,
    pub wan_introduction_address: Address,
    pub tunnel: bool,
    pub connection_type: ConnectionType,
    pub identifier: u16,
    pub extra_bytes: RawEnd,
}

The actual payload send byt the base Community containing all the necessary information for the requester to finalize the connection.

Fields

destination_address: Address

is the address of the receiver. Effectively this should be the wan address that others can use to contact the receiver.

source_lan_address: Address

is the lan address of the sender. Nodes in the same LAN should use this address to communicate.

source_wan_address: Address

is the wan address of the sender. Nodes not in the same LAN should use this address to communicate.

lan_introduction_address: Address

is the lan address of the node that the sender advises the receiver to contact. This address is zero when the associated request did not want advice.

wan_introduction_address: Address

is the wan address of the node that the sender advises the receiver to contact. This address is zero when the associated request did not want advice.

tunnel: bool

When True the receiver will introduce the sender to a new node. This introduction will be facilitated by the receiver sending a puncture-request to the new node.

connection_type: ConnectionType

indicates the connection type that the message creator has.

identifier: u16

is a number that must be given in the associated introduction-response. This number allows to distinguish between multiple introduction-response messages. NOTE: u16 is the max value given by the py-ipv8 implementation (https://github.com/Tribler/py-ipv8/blob/57c1aa73eee8a3b7ee6ad48482fc2e0d5849415e/ipv8/messaging/payload.py#L74)

extra_bytes: RawEnd

is a string that can be used to piggyback extra information.

Trait Implementations

impl Ipv8Payload for IntroductionResponsePayload[src]

impl PartialEq<IntroductionResponsePayload> for IntroductionResponsePayload[src]

impl Debug for IntroductionResponsePayload[src]

impl Serialize for IntroductionResponsePayload[src]

makes the IntroductionResponsePayload serializable. This is less than trivial as there is no 1:1 mapping between the serialized data and the payload struct. Some struct fields are combined into one byte to form the serialized data.

impl<'de> Deserialize<'de> for IntroductionResponsePayload[src]

fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
    D: Deserializer<'de>, 
[src]

deserializes an IntroductionResponsePayload

Auto Trait Implementations

impl Unpin for IntroductionResponsePayload

impl Sync for IntroductionResponsePayload

impl Send for IntroductionResponsePayload

impl RefUnwindSafe for IntroductionResponsePayload

impl UnwindSafe for IntroductionResponsePayload

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]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]