#[non_exhaustive]
pub enum RelayMsg {
Show 23 variants
Begin(Begin),
Data(Data),
End(End),
Connected(Connected),
Sendme(Sendme),
Extend(Extend),
Extended(Extended),
Extend2(Extend2),
Extended2(Extended2),
Truncate,
Truncated(Truncated),
Drop,
Resolve(Resolve),
Resolved(Resolved),
BeginDir,
ConnectUdp(ConnectUdp),
ConnectedUdp(ConnectedUdp),
Datagram(Datagram),
EstablishIntro(EstablishIntro),
EstablishRendezvous(EstablishRendezvous),
Introduce1(Introduce1),
Introduce2(Introduce2),
Unrecognized(Unrecognized),
}Expand description
A single parsed relay message, sent or received along a circuit
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
Begin(Begin)
Create a stream
Data(Data)
Send data on a stream
End(End)
Close a stream
Connected(Connected)
Successful response to a Begin message
Sendme(Sendme)
For flow control
Extend(Extend)
Extend a circuit to a new hop (deprecated)
Extended(Extended)
Successful response to an Extend message (deprecated)
Extend2(Extend2)
Extend a circuit to a new hop
Extended2(Extended2)
Successful response to an Extend2 message
Truncate
Partially close a circuit
Truncated(Truncated)
Tell the client the a circuit has been partially closed
Drop
Used for padding
Resolve(Resolve)
Launch a DNS request
Resolved(Resolved)
Response to a Resolve message
BeginDir
Start a directory stream
ConnectUdp(ConnectUdp)
experimental-udp only.Start a UDP stream.
ConnectedUdp(ConnectedUdp)
experimental-udp only.Successful response to a ConnectUdp message
Datagram(Datagram)
experimental-udp only.UDP stream data
EstablishIntro(EstablishIntro)
onion-service only.Establish Introduction
EstablishRendezvous(EstablishRendezvous)
onion-service only.Establish Rendezvous
Introduce1(Introduce1)
onion-service only.Introduce1
Introduce2(Introduce2)
onion-service only.Introduce2
Unrecognized(Unrecognized)
An unrecognized command.
Implementations
sourceimpl RelayMsg
impl RelayMsg
sourcepub fn decode_from_reader(c: RelayCmd, r: &mut Reader<'_>) -> Result<Self>
pub fn decode_from_reader(c: RelayCmd, r: &mut Reader<'_>) -> Result<Self>
Extract the body of this message from r
sourcepub fn encode_onto(self, w: &mut Vec<u8>) -> EncodeResult<()>
pub fn encode_onto(self, w: &mut Vec<u8>) -> EncodeResult<()>
Encode the body of this message, not including command or length