encode_control

Function encode_control 

Source
pub fn encode_control(message: &ControlMessage) -> (u16, Vec<u8>)
Expand description

Encode a control message to its wire type code and payload — the inverse of decode_control, so decode_control(encode_control(m)) == m.

The UdpTunnel special case is preserved in reverse: its bytes are the raw tunneled audio, emitted verbatim, never wrapped in the (unused) UDPTunnel protobuf message.