send_frame

Function send_frame 

Source
async fn send_frame<W>(
    w: &mut W,
    hdr: Header,
    msg: &mut [u8],
) -> Result<(), NetworkError>
where W: AsyncWrite + Unpin,
Expand description

Write a single frame (header + payload) to the remote.

The header is serialised into the first 4 bytes of msg. It is the caller’s responsibility to ensure there is room at the beginning.