#[repr(u32)]pub enum FrameType {
Show 13 variants
ServerChallenge = 0,
ClientAuth = 1,
ServerConfirmsAuth = 2,
ServerDeniesAuth = 3,
ClientToRelayDatagram = 4,
ClientToRelayDatagramBatch = 5,
RelayToClientDatagram = 6,
RelayToClientDatagramBatch = 7,
EndpointGone = 8,
Ping = 9,
Pong = 10,
Health = 11,
Restarting = 12,
}Expand description
Possible frame types during handshaking
Variants§
ServerChallenge = 0
The server frame type for the challenge response
ClientAuth = 1
The client frame type for the authentication frame
ServerConfirmsAuth = 2
The server frame type for authentication confirmation
ServerDeniesAuth = 3
The server frame type for authentication denial
ClientToRelayDatagram = 4
32B dest pub key + ECN bytes + one datagram’s content
ClientToRelayDatagramBatch = 5
32B dest pub key + ECN byte + segment size u16 + datagrams contents
RelayToClientDatagram = 6
32B src pub key + ECN bytes + one datagram’s content
RelayToClientDatagramBatch = 7
32B src pub key + ECN byte + segment size u16 + datagrams contents
EndpointGone = 8
Sent from server to client to signal that a previous sender is no longer connected.
That is, if A sent to B, and then if A disconnects, the server sends FrameType::PeerGone
to B so B can forget that a reverse path exists on that connection to get back to A
32B pub key of peer that’s gone
Ping = 9
Messages with these frames will be ignored. 8 byte ping payload, to be echoed back in FrameType::Pong
Pong = 10
8 byte payload, the contents of ping being replied to
Health = 11
Sent from server to client to tell the client if their connection is unhealthy somehow. Contains only UTF-8 bytes.
Restarting = 12
Sent from server to client for the server to declare that it’s restarting. Payload is two big endian u32 durations in milliseconds: when to reconnect, and how long to try total.
Trait Implementations§
Source§impl TryFromPrimitive for FrameType
impl TryFromPrimitive for FrameType
impl Copy for FrameType
impl Eq for FrameType
impl StructuralPartialEq for FrameType
Auto Trait Implementations§
impl Freeze for FrameType
impl RefUnwindSafe for FrameType
impl Send for FrameType
impl Sync for FrameType
impl Unpin for FrameType
impl UnwindSafe for FrameType
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.