Added new function declarations (need to be implemented).
This commit is contained in:
parent
1c17b8c3f9
commit
9d5131ca52
@ -27,7 +27,7 @@
|
|||||||
|
|
||||||
namespace neocomm {
|
namespace neocomm {
|
||||||
/**
|
/**
|
||||||
* @brief Network node.
|
* @brief A node meant to connect to the neocomm network.
|
||||||
*/
|
*/
|
||||||
class Node {
|
class Node {
|
||||||
public:
|
public:
|
||||||
@ -43,12 +43,34 @@ namespace neocomm {
|
|||||||
* @param port Local port to bind to.
|
* @param port Local port to bind to.
|
||||||
*/
|
*/
|
||||||
void bind(const short &port = DEFAULT_PORT);
|
void bind(const short &port = DEFAULT_PORT);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Connect to a network via specified host.
|
||||||
|
*
|
||||||
|
* @param host Hostname of network node.
|
||||||
|
* @param port Connection port/service.
|
||||||
|
*/
|
||||||
|
void connect(const std::string &host, const short &port);
|
||||||
|
/**
|
||||||
|
* @brief Load a file of nodes which have been used before.
|
||||||
|
*
|
||||||
|
* @param path Path to the node export file.
|
||||||
|
*/
|
||||||
|
void connect(const std::string &path);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Export the current list of nodes into a file.
|
||||||
|
*
|
||||||
|
* @param path Path to the file in which to save the node list.
|
||||||
|
*/
|
||||||
|
void exportNodeList(const std::string &path);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Retrieve the current status of the connection.
|
* @brief Retrieve the current status of the connection.
|
||||||
*
|
*
|
||||||
* @return String describing connection status.
|
* @return String describing connection status.
|
||||||
*/
|
*/
|
||||||
const std::string getStatus() const;
|
//inline const std::string getStatus();
|
||||||
private:
|
private:
|
||||||
dht::DhtRunner node;
|
dht::DhtRunner node;
|
||||||
dht::NetId status;
|
dht::NetId status;
|
||||||
|
Loading…
Reference in New Issue
Block a user