Expand description
DC (Direct Connect) client implementation
Re-exports§
pub use actions::DcClientProtocol;
Modules§
- actions
- DC (Direct Connect) client protocol actions implementation
Structs§
- DcClient
- DC client that connects to a DC hub
- Private
Message Parts - The fields of an NMDC private message.
Constants§
- MAX_
RECONNECT_ DELAY_ SECS - Longest wait between two reconnection attempts, in seconds.
Functions§
- calculate_
dc_ key - Calculate DC key from lock using NMDC algorithm
- escape_
nmdc_ text - Escape free text (a chat line, a private message, a search query, a
$MyINFOdescription or email) for an NMDC frame, the way DC++ does:$becomes$,|becomes|, and a&that would otherwise read as the start of$,|or&becomes&. The text can then neither end the frame nor open a new command, and the hub decodes exactly the characters given. - parse_
private_ message - Parse an NMDC private message:
$To: <target> From: <source> $<<source>> <message>. - reconnect_
delay_ secs - Delay before reconnection attempt
attempt(1-based):initial_delay_secsdoubled for every attempt after the first, capped atMAX_RECONNECT_DELAY_SECS. - validate_
nmdc_ nickname - Check a nickname before it is written into
$ValidateNick,$MyINFO, a chat prefix or a$To:line.