Struct zenoh::net::Hello[][src]

pub struct Hello {
    pub pid: Option<PeerId>,
    pub whatami: Option<WhatAmI>,
    pub locators: Option<Vec<Locator>>,
}

Hello message

NOTE: 16 bits (2 bytes) may be prepended to the serialized message indicating the total length
      in bytes of the message, resulting in the maximum length of a message being 65_535 bytes.
      This is necessary in those stream-oriented transports (e.g., TCP) that do not preserve
      the boundary of the serialized messages. The length is encoded as little-endian.
      In any case, the length of a message must not exceed 65_535 bytes.

The HELLO message is sent in any of the following three cases:
    1) in response to a SCOUT message;
    2) to (periodically) advertise (e.g., on multicast) the Peer and the locators it is reachable at;
    3) in a already established session to update the corresponding peer on the new capabilities
       (i.e., whatmai) and/or new set of locators (i.e., added or deleted).
Locators are expressed as:
<code>
 udp/192.168.0.2:1234
 tcp/192.168.0.2:1234
 udp/239.255.255.123:5555
<code>

 7 6 5 4 3 2 1 0
+-+-+-+-+-+-+-+-+
|L|W|I|  HELLO  |
+-+-+-+-+-------+
~    peer-id    ~ if I==1
+---------------+
~    whatami    ~ if W==1 -- Otherwise it is from a Broker
+---------------+
~    Locators   ~ if L==1 -- Otherwise src-address is the locator
+---------------+

Fields

pid: Option<PeerId>whatami: Option<WhatAmI>locators: Option<Vec<Locator>>

Trait Implementations

impl Clone for Hello[src]

impl Debug for Hello[src]

impl Display for Hello[src]

impl PartialEq<Hello> for Hello[src]

impl StructuralPartialEq for Hello[src]

Auto Trait Implementations

impl RefUnwindSafe for Hello

impl Send for Hello

impl Sync for Hello

impl Unpin for Hello

impl UnwindSafe for Hello

Blanket Implementations

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

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

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

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

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

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[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<V, T> VZip<V> for T where
    V: MultiLane<T>,