]> git.seodisparate.com - UDPConnection/commitdiff
Begin doxygen-style documentation WIP
authorStephen Seo <seo.disparate@gmail.com>
Wed, 27 Nov 2019 11:26:40 +0000 (20:26 +0900)
committerStephen Seo <seo.disparate@gmail.com>
Wed, 27 Nov 2019 11:26:40 +0000 (20:26 +0900)
src/UDPConnection.h

index 0257729a6632ee32d8024c9a3766b5f9d693057b..b9b3a11f278e53ce18b87c5eee2395d8828eab8f 100644 (file)
@@ -115,13 +115,40 @@ typedef struct {
     } v;
 } UDPC_Event;
 
-/// port should be in native byte order (not network/big-endian)
+/*!
+ * \brief Creates an UDPC_ConnectionId with the given addr and port
+ *
+ * port should be in native byte order (not network/big-endian). This means that
+ * there is no need to convert the 16-bit value to network byte order, this will
+ * be done automatically by this library when necessary (without modifying the
+ * value in the used UDPC_ConnectionId).
+ */
 UDPC_ConnectionId UDPC_create_id(UDPC_IPV6_ADDR_TYPE addr, uint16_t port);
 
+/*!
+ * \brief Creates an UDPC_ConnectionId with the given addr, scope_id, and port
+ *
+ * port should be in native byte order (not network/big-endian).
+ */
 UDPC_ConnectionId UDPC_create_id_full(UDPC_IPV6_ADDR_TYPE addr, uint32_t scope_id, uint16_t port);
 
+/*!
+ * \brief Creates an UDPC_ConnectionId with the given port
+ *
+ * The address contained in the returned UDPC_ConnectionId will be zeroed out
+ * (the "anyaddr" address).
+ * port should be in native byte order (not network/big-endian).
+ */
 UDPC_ConnectionId UDPC_create_id_anyaddr(uint16_t port);
 
+/*!
+ * \brief Creates an UDPC_ConnectionId with the given addr string and port
+ *
+ * The address string should be a valid ipv6 or ipv4 address. (If an ipv4
+ * address is given, the internal address of the returned UDPC_ConnectionId will
+ * be ipv4-mapped ipv6 address.)
+ * port should be in native byte order (not network/big-endian).
+ */
 UDPC_ConnectionId UDPC_create_id_easy(const char *addrString, uint16_t port);
 
 UDPC_HContext UDPC_init(UDPC_ConnectionId listenId, int isClient, int isUsingLibsodium);