aboutsummaryrefslogtreecommitdiff
path: root/libcmix-network
diff options
context:
space:
mode:
authorDennis Brentjes <d.brentjes@gmail.com>2016-10-05 12:56:16 +0200
committerDennis Brentjes <d.brentjes@gmail.com>2016-10-05 12:56:16 +0200
commitedc3690d62890449df3ae4c14636019bce4833f1 (patch)
tree1ede8d7a0b5d489fba9c4d1350c52ad5459f2817 /libcmix-network
parentffb62afc391b280b168daa9518f2fb32e460bcad (diff)
downloadcmix-edc3690d62890449df3ae4c14636019bce4833f1.tar.gz
cmix-edc3690d62890449df3ae4c14636019bce4833f1.tar.bz2
cmix-edc3690d62890449df3ae4c14636019bce4833f1.zip
Added some missing documentation for the retry connections.
Diffstat (limited to 'libcmix-network')
-rw-r--r--libcmix-network/connect.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/libcmix-network/connect.cpp b/libcmix-network/connect.cpp
index 6f1addf..fb663ac 100644
--- a/libcmix-network/connect.cpp
+++ b/libcmix-network/connect.cpp
@@ -29,11 +29,20 @@ boost::asio::ip::tcp::socket connect(std::string host, std::string port, io_serv
throw std::runtime_error("None of the supplied endpoints responded");
}
+/*!
+ * \brief The IterationInfo struct
+ */
struct IterationInfo {
- int iteration;
- boost::asio::ip::tcp::resolver::iterator it;
- boost::asio::deadline_timer retry_timer;
+ int iteration; ///< the iteration we are currently in starting with 0;
+ boost::asio::ip::tcp::resolver::iterator it; ///< The endpoint iterator.
+ boost::asio::deadline_timer retry_timer; ///< A timer to retry in 3, 6, 12, 24, 48, 96 seconds after subsequent connections failures.
+ /*!
+ * \brief IterationInfo
+ * \param iteration
+ * \param it
+ * \param io_service Used to create the deadline_timer
+ */
IterationInfo(int iteration, boost::asio::ip::tcp::resolver::iterator it, boost::asio::io_service& io_service)
: iteration(iteration)
, it(it)