Class CustomMessageReader


  • public class CustomMessageReader
    extends Object
    Trait to be implemented by custom message (unrelated to the channel/gossip LN layers) decoders.
    • Method Detail

      • read

        public Result_COption_TypeZDecodeErrorZ read​(short message_type,
                                                     byte[] buffer)
        Decodes a custom message to `CustomMessageType`. If the given message type is known to the implementation and the message could be decoded, must return `Ok(Some(message))`. If the message type is unknown to the implementation, must return `Ok(None)`. If a decoding error occur, must return `Err(DecodeError::X)` where `X` details the encountered error.