Skip to main content

encode_packet

Function encode_packet 

Source
pub fn encode_packet(packet: &Packet) -> Result<Vec<u8>, ProtocolError>
Expand description

Encode one pkt-line.

Length digits are lowercase hex and include themselves. Data with an empty payload is refused (0004 SHOULD NOT be sent). Data longer than MAX_DATA_LEN is refused.