From 9d5131ca527b6e9e1ee9d8ddac645ec801b9d734 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Ortega=20Froysa?= Date: Wed, 23 Aug 2017 15:11:30 -0500 Subject: [PATCH] Added new function declarations (need to be implemented). --- include/neocomm/Node.hpp | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/include/neocomm/Node.hpp b/include/neocomm/Node.hpp index 5e7dda8..fb0baf0 100644 --- a/include/neocomm/Node.hpp +++ b/include/neocomm/Node.hpp @@ -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;