Package org.ldk.structs
Interface CustomMessageHandler.CustomMessageHandlerInterface
-
- Enclosing class:
- CustomMessageHandler
public static interface CustomMessageHandler.CustomMessageHandlerInterface
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description TwoTuple_PublicKeyTypeZ[]get_and_clear_pending_msg()Returns the list of pending messages that were generated by the handler, clearing the list in the process.Result_NoneLightningErrorZhandle_custom_message(Type msg, byte[] sender_node_id)Handles the given message sent from `sender_node_id`, possibly producing messages for [`CustomMessageHandler::get_and_clear_pending_msg`] to return and thus for [`PeerManager`] to send.InitFeaturesprovided_init_features(byte[] their_node_id)Gets the init feature flags which should be sent to the given peer.NodeFeaturesprovided_node_features()Gets the node feature flags which this handler itself supports.
-
-
-
Method Detail
-
handle_custom_message
Result_NoneLightningErrorZ handle_custom_message(Type msg, byte[] sender_node_id)
Handles the given message sent from `sender_node_id`, possibly producing messages for [`CustomMessageHandler::get_and_clear_pending_msg`] to return and thus for [`PeerManager`] to send.
-
get_and_clear_pending_msg
TwoTuple_PublicKeyTypeZ[] get_and_clear_pending_msg()
Returns the list of pending messages that were generated by the handler, clearing the list in the process. Each message is paired with the node id of the intended recipient. If no connection to the node exists, then the message is simply not sent.
-
provided_node_features
NodeFeatures provided_node_features()
Gets the node feature flags which this handler itself supports. All available handlers are queried similarly and their feature flags are OR'd together to form the [`NodeFeatures`] which are broadcasted in our [`NodeAnnouncement`] message. [`NodeAnnouncement`]: crate::ln::msgs::NodeAnnouncement
-
provided_init_features
InitFeatures provided_init_features(byte[] their_node_id)
Gets the init feature flags which should be sent to the given peer. All available handlers are queried similarly and their feature flags are OR'd together to form the [`InitFeatures`] which are sent in our [`Init`] message. [`Init`]: crate::ln::msgs::Init
-
-