You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2022/06/20 05:57:03 UTC
[incubator-nuttx-apps] 05/05: webclient_get_tunnel: A comment about how to dispose the returned "conn"
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git
commit fe109998c9a5ec6d24f7f6910ea4c893c9ccc516
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Mon Jun 20 09:59:22 2022 +0900
webclient_get_tunnel: A comment about how to dispose the returned "conn"
---
netutils/webclient/webclient.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/netutils/webclient/webclient.c b/netutils/webclient/webclient.c
index b13ab618c..530aa9b69 100644
--- a/netutils/webclient/webclient.c
+++ b/netutils/webclient/webclient.c
@@ -2504,6 +2504,17 @@ int webclient_get_poll_info(FAR struct webclient_context *ctx,
* This function also disposes the given webclient_context.
* The context will be invalid after a call of this function.
*
+ * It's the caller's responsibility to close the returned
+ * webclient_conn_s, either using webclient_conn_close() or
+ * using the internal knowledge about the structure. (E.g.
+ * It's sometimes convenient/efficient for the caller to
+ * only keep conn->sockfd descriptor and free the rest of the
+ * structure using webclient_conn_free(). In that case, it will
+ * need to close() the descriptor after finishing on it.)
+ *
+ * It's the caller's responsibility to free the returned
+ * webclient_conn_s using webclient_conn_free().
+ *
****************************************************************************/
void webclient_get_tunnel(FAR struct webclient_context *ctx,