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;