changeset 552:c8b6ce961af0

Net: some style
author David Demelier <markand@malikania.fr>
date Wed, 15 Jun 2016 13:40:03 +0200
parents 4df397257d44
children 2d1a04e8240a
files modules/net/net.hpp
diffstat 1 files changed, 10 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- 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.