]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[1595] Docs update
authorMichal 'vorner' Vaner <michal.vaner@nic.cz>
Tue, 7 Feb 2012 11:32:09 +0000 (12:32 +0100)
committerMichal 'vorner' Vaner <michal.vaner@nic.cz>
Tue, 7 Feb 2012 11:32:09 +0000 (12:32 +0100)
src/lib/server_common/socket_request.h

index ceef2d38ca0164e1bb2acd91bd162bad6aef185e..a6a5ebb6bcb9c0fd32d4bb2272bb31e05eeaab45 100644 (file)
@@ -167,7 +167,7 @@ public:
     ///     the app_name parameter of initSocketRequestor is used. If that one
     ///     is empty as well, it is accepted, but not recommended, as such
     ///     a non-descriptive name has a high chance of collisions between
-    ///     applications. nOTE THat you should provide a name (by share_name
+    ///     applications. Note that you should provide a name (by share_name
     ///     or app_name) even when you set it to DONT_SHARE (for logs and
     ///     debugging) and you need to provide one with SHARE_SAME (to know
     ///     what is same) and SHARE_ANY (someone else might want SHARE_SAME,
@@ -175,6 +175,17 @@ public:
     /// \return the socket, as a file descriptor and token representing it on
     ///     the socket creator side.
     ///
+    /// To understand the modes better:
+    /// - If mode is DONT_SHARE, it succeeds if no one else has opened an FD
+    ///   for requested protocol, address and port.
+    /// - If mode is SHARE_SAME, it succeeds if all applications who opened a
+    ///   FD for the requested protocol, address and port provided the same
+    ///   share_name as this one and none of them had mode DONT_SHARE.
+    /// - If mode is SHARE_ANY, it succeeds if no applications who requested
+    ///   the same potocol, address and port provided DONT_SHARE and all the
+    ///   applications who provided SHARE_SAME also provided the same
+    ///   share_name as we.
+    ///
     /// \throw InvalidParameter protocol or share_mode is invalid
     /// \throw CCSessionError when we have a problem talking over the CC
     ///     session.