diff options
| author | Dennis Brentjes <d.brentjes@gmail.com> | 2016-09-28 13:18:18 +0200 |
|---|---|---|
| committer | Dennis Brentjes <d.brentjes@gmail.com> | 2016-09-28 13:18:18 +0200 |
| commit | 3fe7a5b6a18b6841ae51f294dc58fe9c8df6d375 (patch) | |
| tree | 345583aaf457ce5076d0d5f7c158628dfd971360 /libcmix-network/server.hpp | |
| parent | 85d25eebd38bb278ad598a291a007938854945a4 (diff) | |
| download | cmix-3fe7a5b6a18b6841ae51f294dc58fe9c8df6d375.tar.gz cmix-3fe7a5b6a18b6841ae51f294dc58fe9c8df6d375.tar.bz2 cmix-3fe7a5b6a18b6841ae51f294dc58fe9c8df6d375.zip | |
Finally made a initial doxygen documentation pass over all files.
Diffstat (limited to 'libcmix-network/server.hpp')
| -rw-r--r-- | libcmix-network/server.hpp | 38 |
1 files changed, 33 insertions, 5 deletions
diff --git a/libcmix-network/server.hpp b/libcmix-network/server.hpp index 942cb14..2e5b272 100644 --- a/libcmix-network/server.hpp +++ b/libcmix-network/server.hpp @@ -4,26 +4,54 @@ #include "acceptor.hpp" +/*! + * \file + */ + +/*! + * \brief The ListenSettings struct + */ struct ListenSettings { - bool enable_ipv4; - std::string ipv4_inaddr; - bool enable_ipv6; - std::string ipv6_inaddr; - uint16_t port; + bool enable_ipv4; ///< Should we listen on ipv4 + std::string ipv4_inaddr; ///< listen on this ipv4 address + bool enable_ipv6; ///< Should we listen on ipv6 + std::string ipv6_inaddr; ///< listen on this ipv6 address + uint16_t port; ///< listen on this port. }; +/*! + * \brief The Server class + */ class Server { public: + /*! + * \brief AcceptHandler + */ typedef std::function<void(boost::asio::ip::tcp::socket&& socket)> AcceptHandler; private: + /*! + * \brief listen_settings + */ ListenSettings const& listen_settings; + /*! + * \brief v4_acceptor + */ Acceptor v4_acceptor; + /*! + * \brief v6_acceptor + */ Acceptor v6_acceptor; public: + /*! + * \brief Server + * \param io_service The io_service this server will use for all its connections. + * \param listen_settings The parameters used for determining on what endpoints to listen. + * \param accept_handler The function to call when connections are established. + */ Server(boost::asio::io_service& io_service, ListenSettings const& listen_settings, AcceptHandler accept_handler); }; |
