aboutsummaryrefslogtreecommitdiff
path: root/libcmix-network/connect.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'libcmix-network/connect.hpp')
-rw-r--r--libcmix-network/connect.hpp21
1 files changed, 20 insertions, 1 deletions
diff --git a/libcmix-network/connect.hpp b/libcmix-network/connect.hpp
index 071ed9b..0a58115 100644
--- a/libcmix-network/connect.hpp
+++ b/libcmix-network/connect.hpp
@@ -3,5 +3,24 @@
#include <boost/asio/ip/tcp.hpp>
#include <boost/asio/io_service.hpp>
-boost::asio::ip::tcp::socket connect(std::string host, boost::asio::io_service& io_service);
+/*!
+ * \file
+ */
+
+/*!
+ * \brief connect Connects to the supplied endpoint and returns the socket
+ * \param host The host
+ * \param port The port
+ * \param io_service The io_service used for the socket being returned.
+ * \return
+ */
+boost::asio::ip::tcp::socket connect(std::string host, std::string port, boost::asio::io_service& io_service);
+
+/*!
+ * \brief async_connect Asynchronously connects to the supplied endpoint.
+ * \param socket The socket on which to invoke the asynchronous connect.
+ * \param host The host
+ * \param next_port The port
+ * \param on_connect The function to call when the connect has succeeded.
+ */
void async_connect(boost::asio::ip::tcp::socket& socket, std::string host, std::string next_port, std::function<void()> on_connect);