Crate pocket_relay_udp_tunnel

Crate pocket_relay_udp_tunnel 

Source
Expand description

Shared protocol codec for the Pocket Relay tunnel protocol

Structs§

MessageDeserializer
Reader for deserializing various data types from a byte buffer
MessageSerializer
Writer for serializing various data types into a byte buffer
TunnelMessageHeader
Header before a tunnel message indicating the protocol version and ID of the tunnel
TunnelPacket
Individual tunnel message packet, includes the packet header and the message

Enums§

MessageError
Errors that can occur while decoding
TunnelMessage
Variants of the tunnel body
TunnelMessageType
Different types of messages that can be sent through the tunnel

Constants§

VERSION
Current version of the protocol

Functions§

deserialize_message
Deserializes a header and a message from the provided buffer
serialize_message
Serializes the provided message into byte form, uses the provided tunnel_id as the tunnel ID in the message header