encode_link2_reply

Function encode_link2_reply 

Source
pub fn encode_link2_reply(
    out: &mut [u8],
    result: Link2Result,
) -> Result<usize, EncodeError>
Expand description

Encode an 8-byte LINK2 reply.

Layout: 4-byte prefix [0x08, 0xC0, 0x04, 0x00] + 4-byte result tag.

  • Link2Result::Acceptb"OKRW"
  • Link2Result::Busyb"BUSY"
  • Link2Result::Unknown { reply } → the supplied 4-byte tag

§Errors

Returns EncodeError::BufferTooSmall if out.len() < 8.

§See also

xlxd/src/cdplusprotocol.cpp:535-544 (EncodeLoginAckPacket / EncodeLoginNackPacket) for the reference encoder.