[−][src]Struct tox_packet::relay::OnionRequest
Sent by client to server.
The server will pack payload from this request to OnionRequest1
packet and send
it to UDP socket. The server can accept both TCP and UDP families as destination
IP address but regardless of this it will always send OnionRequest1
to UDP
socket. Return address from OnionRequest1
will contain TCP address so that
when we get OnionResponse2
we will know that this response should be sent to
TCP client connected to our server.
Serialized form:
Length | Content |
---|---|
1 | 0x08 |
24 | Nonce |
1 | IpType |
4 or 16 | IPv4 or IPv6 address |
0 or 12 | Padding for IPv4 |
2 | Port |
32 | PublicKey |
variable | Payload |
Fields
nonce: Nonce
Nonce that was used for payload encryption
ip_port: IpPort
Address of the next onion node
temporary_pk: PublicKey
Temporary PublicKey
for the current encrypted payload
payload: Vec<u8>
Encrypted payload
Trait Implementations
impl Clone for OnionRequest
[src]
pub fn clone(&self) -> OnionRequest
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for OnionRequest
[src]
impl FromBytes for OnionRequest
[src]
impl PartialEq<OnionRequest> for OnionRequest
[src]
pub fn eq(&self, other: &OnionRequest) -> bool
[src]
pub fn ne(&self, other: &OnionRequest) -> bool
[src]
impl StructuralPartialEq for OnionRequest
[src]
impl ToBytes for OnionRequest
[src]
Auto Trait Implementations
impl RefUnwindSafe for OnionRequest
[src]
impl Send for OnionRequest
[src]
impl Sync for OnionRequest
[src]
impl Unpin for OnionRequest
[src]
impl UnwindSafe for OnionRequest
[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>,