Module mac_cmd

Module mac_cmd 

Source
Expand description

Helper for encoding a MacCommand as an outbound payload without touching the node crate’s public API.

Rationale: adding PeerConnection::send_mac_command to the node crate would duplicate send-plumbing for a single use case. Instead, we prefix the existing mac_command::encode output with PayloadType::MacCommand and call the normal PeerConnection::send.

Functions§

encode_mac_command
Encode cmd into out as a complete MAC-command payload (PayloadType::MacCommand byte + encoded command body). Returns the number of bytes written.