Added a few new functions.
This commit is contained in:
@ -48,6 +48,28 @@ public:
|
||||
unsigned short port = 8085);
|
||||
~node();
|
||||
|
||||
/**
|
||||
* @brief Connect the node to a given address.
|
||||
*
|
||||
* @param address The IP or domain name of the other node.
|
||||
* @param port The port of the other node.
|
||||
*/
|
||||
void connect(const std::string &address,
|
||||
unsigned short port);
|
||||
/**
|
||||
* @brief Import and connect to a list of nodes from a
|
||||
* previous session.
|
||||
*
|
||||
* @param node_file File containing the node list.
|
||||
*/
|
||||
void import_nodes(const std::string &node_file);
|
||||
/**
|
||||
* @brief Export currently connected nodes to a file.
|
||||
*
|
||||
* @param node_file File to export nodes to.
|
||||
*/
|
||||
void export_nodes(const std::string &node_file);
|
||||
|
||||
private:
|
||||
dht::DhtRunner dht_node;
|
||||
};
|
||||
|
Reference in New Issue
Block a user