pub enum RelayToClientMsg {
Datagrams {
remote_endpoint_id: EndpointId,
datagrams: Datagrams,
},
EndpointGone(EndpointId),
Health {
problem: String,
},
Restarting {
reconnect_in: Duration,
try_for: Duration,
},
Ping([u8; 8]),
Pong([u8; 8]),
}Expand description
The messages that a relay sends to clients or the clients receive from the relay.
Variants§
Datagrams
Represents datagrams sent from relays (originally sent to them by another client).
Fields
remote_endpoint_id: EndpointIdThe EndpointId of the original sender.
EndpointGone(EndpointId)
Indicates that the client identified by the underlying public key had previously sent you a packet but has now disconnected from the relay.
Health
A one-way message from relay to client, declaring the connection health state.
Fields
problem: StringIf set, is a description of why the connection is unhealthy.
If None means the connection is healthy again.
The default condition is healthy, so the relay doesn’t broadcast a RelayToClientMsg::Health
until a problem exists.
Restarting
A one-way message from relay to client, advertising that the relay is restarting.
Fields
Ping([u8; 8])
Request from the relay to reply to the
other side with a ClientToRelayMsg::Pong with the given payload.
Pong([u8; 8])
Reply to a ClientToRelayMsg::Ping from a client
with the payload sent previously in the ping.
Implementations§
Trait Implementations§
Source§impl Clone for RelayToClientMsg
impl Clone for RelayToClientMsg
Source§fn clone(&self) -> RelayToClientMsg
fn clone(&self) -> RelayToClientMsg
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RelayToClientMsg
impl Debug for RelayToClientMsg
Source§impl PartialEq for RelayToClientMsg
impl PartialEq for RelayToClientMsg
impl Eq for RelayToClientMsg
impl StructuralPartialEq for RelayToClientMsg
Auto Trait Implementations§
impl !Freeze for RelayToClientMsg
impl RefUnwindSafe for RelayToClientMsg
impl Send for RelayToClientMsg
impl Sync for RelayToClientMsg
impl Unpin for RelayToClientMsg
impl UnwindSafe for RelayToClientMsg
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.