+ /**
+ * Disconnect a peer given its node id.
+ *
+ * Set no_connection_possible to true to prevent any further connection with this peer,
+ * force-closing any channels we have with it.
+ *
+ * If a peer is connected, this will call `disconnect_socket` on the descriptor for the peer,
+ * so be careful about reentrancy issues.
+ */
+ public void disconnect_by_node_id(byte[] node_id, boolean no_connection_possible) {
+ bindings.PeerManager_disconnect_by_node_id(this.ptr, node_id, no_connection_possible);
+ }
+
+ /**
+ * This function should be called roughly once every 30 seconds.
+ * It will send pings to each peer and disconnect those which did not respond to the last round of pings.
+ * Will most likely call send_data on all of the registered descriptors, thus, be very careful with reentrancy issues!
+ */
+ public void timer_tick_occurred() {
+ bindings.PeerManager_timer_tick_occurred(this.ptr);