BitShares-Core  7.0.2
BitShares blockchain node software and command-line wallet software
Public Member Functions | List of all members
graphene::app::network_node_api Class Reference

The network_node_api class allows maintenance of p2p connections. More...

#include <api.hpp>

Public Member Functions

 network_node_api (application &a)
 
fc::variant_object get_info () const
 Return general network information, such as p2p port. More...
 
void add_node (const fc::ip::endpoint &ep)
 add_node Connect to a new peer More...
 
std::vector< net::peer_statusget_connected_peers () const
 Get status of all current connections to peers. More...
 
fc::variant_object get_advanced_node_parameters () const
 Get advanced node parameters, such as desired and max number of connections. More...
 
void set_advanced_node_parameters (const fc::variant_object &params)
 Set advanced node parameters, such as desired and max number of connections. More...
 
std::vector< net::potential_peer_recordget_potential_peers () const
 Return list of potential peers. More...
 

Detailed Description

The network_node_api class allows maintenance of p2p connections.

Definition at line 393 of file api.hpp.

Constructor & Destructor Documentation

◆ network_node_api()

graphene::app::network_node_api::network_node_api ( application a)
explicit

Definition at line 198 of file api.cpp.

Member Function Documentation

◆ add_node()

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

add_node Connect to a new peer

Parameters
epThe IP/Port of the peer to connect to

Definition at line 211 of file api.cpp.

◆ get_advanced_node_parameters()

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

Get advanced node parameters, such as desired and max number of connections.

Definition at line 231 of file api.cpp.

◆ get_connected_peers()

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

Get status of all current connections to peers.

Definition at line 217 of file api.cpp.

◆ get_info()

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

Return general network information, such as p2p port.

Definition at line 203 of file api.cpp.

◆ get_potential_peers()

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

Return list of potential peers.

Definition at line 224 of file api.cpp.

◆ set_advanced_node_parameters()

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

Set advanced node parameters, such as desired and max number of connections.

Parameters
paramsa JSON object containing the name/value pairs for the parameters to set

Definition at line 237 of file api.cpp.


The documentation for this class was generated from the following files: