+pub trait OnionMessageHandler {
+ /// Because much of the lightning network does not yet support forwarding onion messages, we
+ /// may need to directly connect to a node which will forward a message for us. In such a case,
+ /// this method will return the set of nodes which need connection by node_id and the
+ /// corresponding socket addresses where they may accept incoming connections.
+ ///
+ /// Thus, this method should be polled regularly to detect messages await such a direct
+ /// connection.
+ fn get_and_clear_connections_needed(&self) -> Vec<(PublicKey, Vec<SocketAddress>)>;
+