[][src]Struct tox_packet::relay::OobSend

pub struct OobSend {
    pub destination_pk: PublicKey,
    pub data: Vec<u8>,
}

Sent by client to server. If a peer with private key equal to the key they announced themselves with is connected, the data in the OOB send packet will be sent to that peer as an OOB recv packet. If no such peer is connected, the packet is discarded. The toxcore TCP_server implementation has a hard maximum OOB data length of 1024. 1024 was picked because it is big enough for the net_crypto packets related to the handshake and is large enough that any changes to the protocol would not require breaking TCP server. It is however not large enough for the bigges net_crypto packets sent with an established net_crypto connection to prevent sending those via OOB packets.

OOB packets can be used just like normal data packets however the extra size makes sending data only through them less efficient than data packets.

Serialized form:

LengthContent
10x06
32Public Key
variableData

Fields

destination_pk: PublicKey

Public Key of the receiver

data: Vec<u8>

OOB data packet

Trait Implementations

impl Clone for OobSend[src]

impl Debug for OobSend[src]

impl FromBytes for OobSend[src]

impl PartialEq<OobSend> for OobSend[src]

impl StructuralPartialEq for OobSend[src]

impl ToBytes for OobSend[src]

Auto Trait Implementations

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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.