Struct zenoh_protocol::proto::InitSyn [−][src]
Init 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 INIT message is sent on a specific Locator to initiate a session with the peer associated
with that Locator. The initiator MUST send an INIT message with the A flag set to 0. If the
corresponding peer deems appropriate to initialize a session with the initiator, the corresponding
peer MUST reply with an INIT message with the A flag set to 1.
7 6 5 4 3 2 1 0
+-+-+-+-+-+-+-+-+
|X|S|A| INIT |
+-+-+-+-+-------+
| v_maj | v_min | if A==0 -- Protocol Version VMaj.VMin
+-------+-------+
~ whatami ~ -- Client, Router, Peer or a combination of them
+---------------+
~ peer_id ~ -- PID of the sender of the INIT message
+---------------+
~ sn_resolution ~ if S==1(*) -- Otherwise 2^28 is assumed(**)
+---------------+
~ cookie ~ if A==1
+---------------+
(*) if A==0 and S==0 then 2^28 is assumed.
if A==1 and S==0 then the agreed resolution is the one communicated by the initiator.
Fields
version: u8
whatami: WhatAmI
pid: PeerId
sn_resolution: Option<ZInt>
Trait Implementations
impl Clone for InitSyn
[src]
impl Debug for InitSyn
[src]
impl PartialEq<InitSyn> for InitSyn
[src]
impl StructuralPartialEq for InitSyn
[src]
Auto Trait Implementations
impl RefUnwindSafe for InitSyn
[src]
impl Send for InitSyn
[src]
impl Sync for InitSyn
[src]
impl Unpin for InitSyn
[src]
impl UnwindSafe for InitSyn
[src]
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> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
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>,