group Network_NodeAPI

Summary

Members Descriptions
public fc::variant_objectget_info() const Return general network information, such as p2p port.
public voidadd_node(const fc::ip::endpoint & ep) add_node Connect to a new peer
public std::vector< net::peer_status >get_connected_peers() const Get status of all current connections to peers.
public fc::variant_objectget_advanced_node_parameters() const Get advanced node parameters, such as desired and max number of connections.
public voidset_advanced_node_parameters(const fc::variant_object & params) Set advanced node parameters, such as desired and max number of connections.
public std::vector< net::potential_peer_record >get_potential_peers() const Return list of potential peers.
public voidseeding_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 packages_path,const string region_code) This method allows user to start seeding plugin from running application.

Members

public fc::variant_objectget_info() const

Return general network information, such as p2p port.

public voidadd_node(const fc::ip::endpoint & ep)

add_node Connect to a new peer

Parameters

  • ep The IP/Port of the peer to connect to

public std::vector< net::peer_status >get_connected_peers() const

Get status of all current connections to peers.

public fc::variant_objectget_advanced_node_parameters() const

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

public voidset_advanced_node_parameters(const fc::variant_object & params)

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

Parameters

  • params a JSON object containing the name/value pairs for the parameters to set

public std::vector< net::potential_peer_record >get_potential_peers() const

Return list of potential peers.

public voidseeding_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 packages_path,const string region_code)

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

Parameters

  • account_id ID of account controlling this seeder

  • content_private_key El Gamal content private key

  • seeder_private_key Private key of the account controlling this seeder

  • free_space Allocated disk space, in MegaBytes

  • seeding_price Price per MegaBytes

  • packages_path Packages storage path

  • region_code Optional ISO 3166-1 alpha-2 two-letter region code