Skip to main content

encode_message

Function encode_message 

Source
pub fn encode_message(msg: &Message) -> Result<BytesMut, EncodeError>
Expand description

Encode a BGP message into a newly allocated BytesMut.

Returns the complete wire-format message including the 19-byte header.

§Errors

Returns an EncodeError if the message exceeds the maximum BGP message size or a field value is out of range.