pub enum Protocol {
    Ping,
    WhatTimeIsIt,
    Http,
    HttpProxy,
    Socks5,
    Tcp,
}Variants§
Ping
client can send this message to check if the connection is open / healthy.
WhatTimeIsIt
client may not be using NTP, or may only have p2p access and no other internet access, in which case it can ask for the time from the peers and try to create a consensus.
Http
client wants to make an HTTP request to a device whose ID is specified. note that the exact ip:port is not known to peers, they only the “device id” for the service. server will figure out the ip:port from the device id.
HttpProxy
Socks5
if the client wants their traffic to route via this server, they can send this. for this to work, the person owning the device must have created a SOCKS5 device, and allowed this peer to access it.
Tcp
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Protocol
 
impl<'de> Deserialize<'de> for Protocol
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
Source§impl From<Protocol> for ProtocolHeader
 
impl From<Protocol> for ProtocolHeader
impl StructuralPartialEq for Protocol
Auto Trait Implementations§
impl Freeze for Protocol
impl RefUnwindSafe for Protocol
impl Send for Protocol
impl Sync for Protocol
impl Unpin for Protocol
impl UnwindSafe for Protocol
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