@@ -99,6 +99,12 @@ class client {
9999 host, service, address_family, address_protocol, timeout);
100100 }
101101
102+ /* !
103+ * @brief Send data to an endpoint in async fashion. See `send` for parameter reference.
104+ * @return Returns a future with the same contents that `send` returns.
105+ * @extends send
106+ */
107+
102108 inline std::future<std::pair<std::size_t , std::error_condition>> send_async (const std::vector<uint8_t > &data,
103109 std::chrono::milliseconds timeout = DEFAULT_TIMEOUT)
104110 {
@@ -108,6 +114,22 @@ class client {
108114 },
109115 data, timeout);
110116 }
117+
118+
119+ /* !
120+ * @brief Send data to a server.
121+ *
122+ * @remark Assumes that a connection was established. Returns \p not_connected if not.
123+ *
124+ * @param data The data that is to be transmitted.
125+ *
126+ * @param timeout The max amount of time that this function may wait until
127+ * returning. The function may return sooner than \p timeout, for example if an error
128+ * was detected or if all bytes indicated in \p byte_count where sent.
129+ *
130+ * @return Returns a pair with the actual amount of data sent and an error.
131+ */
132+
111133 inline std::pair<std::size_t , std::error_condition> send (const std::vector<uint8_t > &data,
112134 std::chrono::milliseconds timeout = DEFAULT_TIMEOUT)
113135 {
@@ -129,7 +151,9 @@ class client {
129151 }
130152
131153 /* !
132- * @brief
154+ * @brief Recieve data from a server in async fashion. See `recv` for parameter reference.
155+ * @return Returns a future with the same contents that `recv` returns.
156+ * @extends recv
133157 */
134158
135159 inline std::future<std::pair<std::vector<uint8_t >, std::error_condition>> recv_async (std::size_t byte_count = 0 ,
0 commit comments