[−][src]Struct zenoh_protocol::proto::Open
NOTE: 16 bits (2 bytes) may be prepended to the serialized message indicating the total lenght in bytes of the message, resulting in the maximum lenght of a message being 65_536 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 lenght of a message must not exceed 65_535 bytes.
The OPEN message is sent on a specific Locator to initiate a session with the peer associated with that Locator.
7 6 5 4 3 2 1 0 +-+-+-+-+-+-+-+-+ |X|X|O| OPEN | +-+-+-+-+-------+ | v_maj | v_min | -- Protocol Version VMaj.VMin +-------+-------+ ~ whatami ~ -- E.g., client, router, peer or a combination of them +---------------+ ~ o_peer_id ~ -- PID of the sender of the OPEN +---------------+ ~ lease_period ~ -- Lease period of the session +---------------+ ~ initial_sn ~ -- Initial SN proposed by the sender of the OPEN(*) +-+-+-+-+-+-+-+-+ |L|S|X|X|X|X|X|X| if O==1 +-+-+-+-+-+-+-+-+ ~ sn_resolution ~ if S==1 -- Otherwise 2^28 is assumed(**) +---------------+ ~ Locators ~ if L==1 -- List of locators the sender of the OPEN is reachable at +---------------+
(*) The Initial SN must be bound to the proposed SN Resolution. Otherwise the OPEN message is consmsg::idered invalid and it should be discarded by the recipient of the OPEN message. (**) In case of the Accepter Peer negotiates a smaller SN Resolution (see ACCEPT message) and the proposed Initial SN results to be out-of-bound, the new Agreed Initial SN is calculated according to the following modulo operation: Agreed Initial SN := (Initial SN_Open) mod (SN Resolution_Accept)
Fields
version: u8
whatami: WhatAmI
pid: PeerId
lease: ZInt
initial_sn: ZInt
sn_resolution: Option<ZInt>
locators: Option<Vec<Locator>>
Trait Implementations
impl Clone for Open
[src]
impl Debug for Open
[src]
impl PartialEq<Open> for Open
[src]
impl StructuralPartialEq for Open
[src]
Auto Trait Implementations
impl RefUnwindSafe for Open
impl Send for Open
impl Sync for Open
impl Unpin for Open
impl UnwindSafe for Open
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,
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.
fn to_owned(&self) -> T
[src]
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.
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.
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>,