Added new function declarations (need to be implemented).

This commit is contained in:
Nicolás Ortega Froysa 2017-08-23 15:11:30 -05:00
parent 1c17b8c3f9
commit 9d5131ca52
No known key found for this signature in database
GPG Key ID: FEC70E3BAE2E69BF

View File

@ -27,7 +27,7 @@
namespace neocomm {
/**
* @brief Network node.
* @brief A node meant to connect to the neocomm network.
*/
class Node {
public:
@ -43,12 +43,34 @@ namespace neocomm {
* @param port Local port to bind to.
*/
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.
*
* @return String describing connection status.
*/
const std::string getStatus() const;
//inline const std::string getStatus();
private:
dht::DhtRunner node;
dht::NetId status;