pub fn encode_message(
packet_type: PacketType,
payload: &[u8],
packet_size: usize,
) -> Result<Vec<u8>, PacketFrameError>Expand description
Encodes a message payload into one or more TDS packets.
packet_size is the maximum packet length including the 8-byte header. The
helper emits client packet IDs starting at one and sets
END_OF_MESSAGE only on the final packet.