Module packets

Source
Expand description

Structs and functions for representing DHT messages and serializing and deserializing them

Structs§

AnnouncePeerRequestArguments
ErrorSpecific
FindNodeRequestArguments
FindNodeResponseArguments
GetPeersRequestArguments
GetPeersResponseArguments
Message
All packets sent and received via DHT are a serialized version of this struct.
MessageBuilder
Allows building packets::Message structs in a more human-friendly way.
PingRequestArguments
PingResponseArguments
SampleInfoHashesRequestArguments
SampleInfoHashesResponseArguments

Enums§

GetPeersResponseValues
MessageType
RequestSpecific
ResponseSpecific

Functions§

response_matches_request
Returns true if the response and request types specified match. E.g., PingResponse goes with PingRequest. FindNodeResponse goes with FindNodeRequest.
sockaddr_to_bytes