#pragma once #include #include #include /*! * \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 port The port * \param on_connect The function to call when the connect has succeeded. */ void async_connect(boost::asio::basic_socket& socket, std::string host, std::string port, std::function on_connect);