[−][src]Struct tox_packet::relay::OobSend
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:
Length | Content |
---|---|
1 | 0x06 |
32 | Public Key |
variable | Data |
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
impl RefUnwindSafe for OobSend
[src]
impl Send for OobSend
[src]
impl Sync for OobSend
[src]
impl Unpin for OobSend
[src]
impl UnwindSafe for OobSend
[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> 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>,