Class CustomMessageHandler


  • public class CustomMessageHandler
    extends Object
    Handler for BOLT1-compliant messages.
    • Method Detail

      • get_custom_message_reader

        public CustomMessageReader get_custom_message_reader()
        Gets the underlying CustomMessageReader.
      • handle_custom_message

        public Result_NoneLightningErrorZ handle_custom_message​(Type msg,
                                                                byte[] sender_node_id)
        Called with the message type that was received and the buffer to be read. Can return a `MessageHandlingError` if the message could not be handled.
      • get_and_clear_pending_msg

        public TwoTuple<byte[],​Type>[] get_and_clear_pending_msg()
        Gets the list of pending messages which were generated by the custom message handler, clearing the list in the process. The first tuple element must correspond to the intended recipients node ids. If no connection to one of the specified node does not exist, the message is simply not sent to it.