pub struct OobSend {
pub destination_pk: PublicKey,
pub data: Vec<u8>,
}
Expand description
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