pub enum ControlMessage {
Hello {
version: u8,
requested_id: Option<String>,
auth_token: Option<String>,
},
Welcome {
tunnel_id: String,
tunnel_url: String,
},
ClientConnected {
client_id: String,
},
ClientDisconnected {
client_id: String,
},
Ping {
timestamp: u64,
},
Pong {
timestamp: u64,
},
Close {
reason: String,
},
Error {
code: String,
message: String,
},
}Expand description
Control messages for tunnel management (sent in plaintext over WSS)
Variants§
Hello
Agent -> Relay: Initial handshake to establish tunnel
Fields
Welcome
Relay -> Agent: Handshake response with assigned tunnel info
Fields
ClientConnected
Relay -> Agent: A client has connected to the tunnel
ClientDisconnected
Relay -> Agent: A client has disconnected
Ping
Bidirectional: Keep-alive ping
Pong
Bidirectional: Keep-alive pong
Close
Either side: Graceful close
Error
Relay -> Agent/Client: Error occurred
Trait Implementations§
Source§impl Clone for ControlMessage
impl Clone for ControlMessage
Source§fn clone(&self) -> ControlMessage
fn clone(&self) -> ControlMessage
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ControlMessage
impl Debug for ControlMessage
Source§impl<'de> Deserialize<'de> for ControlMessage
impl<'de> Deserialize<'de> for ControlMessage
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ControlMessage
impl RefUnwindSafe for ControlMessage
impl Send for ControlMessage
impl Sync for ControlMessage
impl Unpin for ControlMessage
impl UnsafeUnpin for ControlMessage
impl UnwindSafe for ControlMessage
Blanket Implementations§
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
Mutably borrows from an owned value. Read more