diff options
Diffstat (limited to 'node/nextnode.hpp')
| -rw-r--r-- | node/nextnode.hpp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/node/nextnode.hpp b/node/nextnode.hpp index 42206bb..24b93c4 100644 --- a/node/nextnode.hpp +++ b/node/nextnode.hpp @@ -4,13 +4,39 @@ #include <boost/asio/ip/tcp.hpp> +/*! + * \file + */ + +/*! + * \brief The NextNode class represents the next node in the network, will only be sent to. + */ class NextNode : public Client { public: + /*! + * \brief NextNode + * \param socket an rvalue reference to the socket it takes ownership and uses to communicate with the next node in the network. + */ NextNode(boost::asio::ip::tcp::socket&& socket); + /*! + * \brief send + * \param message is the string that is send to the next node. + */ void send(std::string message); + + /*! + * \brief connect + * \param next_host The host of the next node. + * \param next_port The port of the next node. + * \param on_connect The callback to call when the connect was succesfull. + */ void connect(std::string next_host, std::string next_port, std::function<void()> on_connect); + + /*! + * \brief close This function closes the underlying socket connection. + */ void close(); }; |
