Golos
Разработчикам Статистика Баунти Документация Партнеры Github
Public Member Functions | List of all members
golos::application::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 (const api_context &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< network::peer_status > get_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< network::potential_peer_record > get_potential_peers () const
 Return list of potential peers. More...
 
void on_api_startup ()
 internal method, not exposed via JSON RPC More...
 

Detailed Description

The network_node_api class allows maintenance of p2p connections.

Definition at line 115 of file api.hpp.

Constructor & Destructor Documentation

◆ network_node_api()

golos::application::network_node_api::network_node_api ( const api_context a)

Definition at line 237 of file api.cpp.

Member Function Documentation

◆ add_node()

void golos::application::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 249 of file api.cpp.

◆ get_advanced_node_parameters()

fc::variant_object golos::application::network_node_api::get_advanced_node_parameters ( ) const

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

Definition at line 261 of file api.cpp.

◆ get_connected_peers()

std::vector< network::peer_status > golos::application::network_node_api::get_connected_peers ( ) const

Get status of all current connections to peers.

Definition at line 253 of file api.cpp.

◆ get_info()

fc::variant_object golos::application::network_node_api::get_info ( ) const

Return general network information, such as p2p port.

Definition at line 243 of file api.cpp.

◆ get_potential_peers()

std::vector< network::potential_peer_record > golos::application::network_node_api::get_potential_peers ( ) const

Return list of potential peers.

Definition at line 257 of file api.cpp.

◆ on_api_startup()

void golos::application::network_node_api::on_api_startup ( )

internal method, not exposed via JSON RPC

Definition at line 240 of file api.cpp.

◆ set_advanced_node_parameters()

void golos::application::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 265 of file api.cpp.


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