DECENT
Functions
Network NodeAPI

Functions

string graphene::app::network_node_api::info ()
 
fc::variant_object graphene::app::network_node_api::get_info () const
 Returns general network information, such as p2p port. More...
 
void graphene::app::network_node_api::add_node (const fc::ip::endpoint &ep)
 Connects to a new peer. More...
 
std::vector< net::peer_status > graphene::app::network_node_api::get_connected_peers () const
 Get status of all current connections to peers. More...
 
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. More...
 
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. More...
 
std::vector< net::potential_peer_record > graphene::app::network_node_api::get_potential_peers () const
 Get a list of potential peers we can connect to. More...
 
void graphene::app::network_node_api::seeding_startup (const account_id_type &account_id, const DInteger &content_private_key, const fc::ecc::private_key &seeder_private_key, const uint64_t free_space, const uint32_t seeding_price, const string seeding_symbol, const string packages_path, const string region_code="")
 This method allows user to start seeding plugin from running application. More...
 

Detailed Description

Function Documentation

◆ add_node()

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

Connects to a new peer.

Parameters
epthe IP/Port of the peer to connect to

Definition at line 189 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.

Returns
advanced node parameters

Definition at line 204 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.

Returns
status of all connected peers

Definition at line 194 of file api.cpp.

◆ get_info()

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

Returns general network information, such as p2p port.

Returns
general network information

Definition at line 182 of file api.cpp.

◆ get_potential_peers()

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

Get a list of potential peers we can connect to.

Returns
a list of potential peers

Definition at line 199 of file api.cpp.

◆ info()

string graphene::app::network_node_api::info ( )
inline

Get the name of the API.

Returns
the name of the API

Definition at line 264 of file api.hpp.

◆ seeding_startup()

void graphene::app::network_node_api::seeding_startup ( const account_id_type account_id,
const DInteger &  content_private_key,
const fc::ecc::private_key &  seeder_private_key,
const uint64_t  free_space,
const uint32_t  seeding_price,
const string  seeding_symbol,
const string  packages_path,
const string  region_code = "" 
)

This method allows user to start seeding plugin from running application.

Parameters
account_idID of the account controlling this seeder
content_private_keyEl Gamal content private key
seeder_private_keyprivate key of the account controlling this seeder
free_spaceallocated disk space, in MegaBytes
seeding_priceprice per MegaBytes
seeding_symbolseeding price asset, e.g. DCT
packages_pathpackages storage path
region_codeoptional ISO 3166-1 alpha-2 two-letter region code

Definition at line 214 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 209 of file api.cpp.