+ /**
+ * 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.
+ */
+ public TwoTuple_PublicKeyCVec_SocketAddressZZ[] get_and_clear_connections_needed() {
+ long[] ret = bindings.OnionMessageHandler_get_and_clear_connections_needed(this.ptr);
+ Reference.reachabilityFence(this);
+ int ret_conv_40_len = ret.length;
+ TwoTuple_PublicKeyCVec_SocketAddressZZ[] ret_conv_40_arr = new TwoTuple_PublicKeyCVec_SocketAddressZZ[ret_conv_40_len];
+ for (int o = 0; o < ret_conv_40_len; o++) {
+ long ret_conv_40 = ret[o];
+ TwoTuple_PublicKeyCVec_SocketAddressZZ ret_conv_40_hu_conv = new TwoTuple_PublicKeyCVec_SocketAddressZZ(null, ret_conv_40);
+ if (ret_conv_40_hu_conv != null) { ret_conv_40_hu_conv.ptrs_to.add(this); };
+ ret_conv_40_arr[o] = ret_conv_40_hu_conv;
+ }
+ return ret_conv_40_arr;
+ }
+