pub fn decode_client_to_server(
bytes: &[u8],
sink: &mut dyn DiagnosticSink,
) -> Result<ClientPacket, DcsError>Expand description
Decode a UDP datagram sent from a DCS client (client → server).
§Errors
DcsError::UnknownPacketLengthfor unrecognized lengthsDcsError::VoiceMagicMissingfor 100-byte packets withoutb"0001"magicDcsError::StreamIdZerofor voice packets with stream id 0DcsError::InvalidModuleBytefor LINK with a non-A-Z module byte at[8]or[9]DcsError::UnlinkModuleByteInvalidfor UNLINK with byte[9]≠0x20
§See also
ircDDBGateway/Common/DCSProtocolHandler.cpp — the reference
parser this decoder mirrors. xlxd/src/cdcsprotocol.cpp is
a mirror reference.