Added new function declarations (need to be implemented).
This commit is contained in:
		@@ -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;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user