# HG changeset patch # User David Demelier # Date 1465990803 -7200 # Node ID c8b6ce961af0add5d4d6986c97970404b218adbb # Parent 4df397257d4449a9f7ab2caa17fbede8adbe9cc1 Net: some style diff -r 4df397257d44 -r c8b6ce961af0 modules/net/net.hpp --- a/modules/net/net.hpp Wed Jun 15 13:34:35 2016 +0200 +++ b/modules/net/net.hpp Wed Jun 15 13:40:03 2016 +0200 @@ -1110,9 +1110,9 @@ * operations, the user must wait the socket to be readable or writable. This can be checked with Socket::condition. */ enum class Condition { - None, //!< No condition is required - Readable = (1 << 0), //!< The socket must be readable - Writable = (1 << 1) //!< The socket must be writable + None, //!< No condition is required + Readable = (1 << 0), //!< The socket must be readable + Writable = (1 << 1) //!< The socket must be writable }; /** @@ -1849,11 +1849,8 @@ * \brief SSL connection mode. */ enum Mode { - /// Use Server when you accept a socket server side. - Server, - - /// Use Client when you connect to a server. - Client + Server, //!< Use Server when you accept a socket server side, + Client //!< Use Client when you connect to a server. }; private: @@ -1926,7 +1923,7 @@ * * \param file the path to the private key */ - inline void setPrivateKey(std::string file, int type = SSL_FILETYPE_PEM) noexcept + inline void setPrivateKey(std::string file, int type = SSL_FILETYPE_PEM) { if (SSL_use_PrivateKey_file(m_ssl.get(), file.c_str(), type) != 1) throw Error(error()); @@ -1937,7 +1934,7 @@ * * \param file the path to the file */ - inline void setCertificate(std::string file, int type = SSL_FILETYPE_PEM) noexcept + inline void setCertificate(std::string file, int type = SSL_FILETYPE_PEM) { if (SSL_use_certificate_file(m_ssl.get(), file.c_str(), type) != 1) throw Error(error()); @@ -2355,6 +2352,7 @@ static Ip resolve(const std::string &host, const std::string &service, int domain = AF_INET, int type = SOCK_STREAM) { assert(domain == AF_INET || domain == AF_INET6); + #if !defined(NET_NO_AUTO_INIT) init(); #endif @@ -3190,8 +3188,8 @@ */ class ListenerStatus { public: - Handle socket; //!< which socket is ready - Condition flags; //!< the flags + Handle socket; //!< which socket is ready + Condition flags; //!< the flags }; /** @@ -4005,7 +4003,6 @@ } }; - /** * \ingroup net-module-tcp * \brief Helper to create TCP/Ipv4 or TCP/Ipv6 sockets.