Manages the node's peer connections. Can add a node to the connection queue, remove an existing connection, or attempt a one‑time connection.
Usage
mc_add_node(conn, node, command = c("add", "remove", "onetry"))Arguments
- conn
A connection object created by
mc_connect.- node
Character string. The IP address and port of the peer node, e.g.,
"127.0.0.1:8571".- command
Character string. The action to perform:
"add"– add the node to the connection queue (will attempt to connect and stay connected)."remove"– disconnect from the node if currently connected."onetry"– attempt a single connection; do not keep retrying.
Value
Invisibly returns the RPC result (typically NULL) on success;
throws an error if the command fails.
See also
mc_get_added_node_info to list added nodes,
mc_get_peer_info for connected peers.
Other networking:
mc_get_added_node_info(),
mc_get_network_info(),
mc_get_peer_info(),
mc_list_stored_nodes(),
mc_ping(),
mc_store_node()