Function sage_mqtt::codec::write_binary_data [−][src]
pub async fn write_binary_data<W: AsyncWrite + Unpin>(
data: &[u8],
writer: &mut W
) -> SageResult<usize>
Expand description
Write the given data
into writer
according to Binary Data type MQTT5 specifications
which consists in a two bytes integer representing the data size in bytes followed with
the data as bytes.
In case of success returns the written size in bytes.