open fun decode(newBuffer: ByteBuffer): MutableList<Message<ByteArray>>
Decodes one or more STOMP frames from the given ByteBuffer into a list of Messages.
If there was enough data to parse a "content-length" header, then the value is used to determine how much more data is needed before a new attempt to decode is made.
If there was not enough data to parse the "content-length", or if there is "content-length" header, every subsequent call to decode attempts to parse again with all available data. Therefore the presence of a "content-length" header helps to optimize the decoding of large messages.
newBuffer - a buffer containing new data to decode
StompConversionException - raised in case of decoding issues
Return
decoded messages or an empty list