[][src]Struct discortp::discord::IpDiscovery

pub struct IpDiscovery {
    pub pkt_type: IpDiscoveryType,
    pub length: u16be,
    pub ssrc: u32be,
    pub address: Vec<u8>,
    pub port: u16be,
    pub payload: Vec<u8>,
}

Packet format for Discord's IP Discovery, used in NAT tunnelling.

A description of fields:

pkt_type

Denotes whether this packet is a request or response.

length

Length (in bytes) of all successive fields. This controls the string length of address.

In ordinary use, this should be set to 70.

ssrc

SSRC that the requesting client has been assigned to use over RTP.

address

Null-terminated C-string containing the address of the requester as seen by the server.

Requests should leave this empty.

port

Client's source port, as seen by the server.

Requests may include their destination port.

payload

No payload exists for this packet type: 0-length.

Fields

pkt_type: IpDiscoveryTypelength: u16bessrc: u32beaddress: Vec<u8>port: u16bepayload: Vec<u8>

Trait Implementations

impl Clone for IpDiscovery[src]

impl Debug for IpDiscovery[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.