Function sage_mqtt::codec::write_two_byte_integer[][src]

pub async fn write_two_byte_integer<W: AsyncWrite + Unpin>(
    data: u16,
    writer: &mut W
) -> SageResult<usize>
Expand description

Write the given u16 according to MQTT5 Two Byte Integer specifications. In case of success, returns 2.