7.3 Network Nodes API

7.2.1 access to network information

get_info
prototype

fc::variant_object graphene::app::network_node_api::get_info()const

description
return general network information
get_connected_peers
prototype

std::vector<net::peer_status> graphene::app::network_node_api::get_connected_peers()const

description
Get the status of connection for all the current nodes.
get_potential_peers
prototype

std::vector<net::potential_peer_record> graphene::app::network_node_api::get_potential_peers()const

description
Return a list of potential nodes.
get_advanced_node_parameters
prototype

fc::variant_objectgraphene::app::network_node_api::get_advanced_node_parameters()const

description
Get the advanced parameters of the node, such as the maximum number of connections.

7.2.2 change the network setting

add_node
prototype

void graphene::app::network_node_api::add_node(const fc::ip::endpoint &ep)

description
Add new nodes.
parameter
ep: the node IP or port to be connected.
set_advanced_node_parameters
prototype

void graphene::app::network_node_api::set_advanced_node_parameters(const fc::variant_object &params)

description
Set advanced node parameters, such as the maximum number of connections.
parameter
params: a JSON object containing the name/value of the parameter to be set

Updated 3 months ago


WHAT'S NEXT LABEL

7.3 Database API

7.3 Network Nodes API


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.