From 2d0d9bef888d0bbad5719f8fe7ef54f2b5a6d075 Mon Sep 17 00:00:00 2001 From: Abtin Keshavarzian Date: Mon, 13 Mar 2023 22:17:51 -0700 Subject: [PATCH] [tcp] update `otTcpConnect()` doc to indicate currently supported behavior (#8835) This commit updates the documentation for `otTcpConnect()` indicating that caller need to wait for `otTcpEstablished` callback indicating that TCP connection was established before it can start sending data (e.g., calling `otTcpSendByReference()`). It also removes the mention of "TCP Fast Open" which is not yet supported. --- include/openthread/instance.h | 2 +- include/openthread/tcp.h | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/openthread/instance.h b/include/openthread/instance.h index d15be0b83..d17c4a3dc 100644 --- a/include/openthread/instance.h +++ b/include/openthread/instance.h @@ -53,7 +53,7 @@ extern "C" { * @note This number versions both OpenThread platform and user APIs. * */ -#define OPENTHREAD_API_VERSION (298) +#define OPENTHREAD_API_VERSION (299) /** * @addtogroup api-instance diff --git a/include/openthread/tcp.h b/include/openthread/tcp.h index 910831a01..3b63bc359 100644 --- a/include/openthread/tcp.h +++ b/include/openthread/tcp.h @@ -401,11 +401,11 @@ enum /** * Records the remote host and port for this connection. * - * By default TCP Fast Open is used. This means that this function merely - * records the remote host and port, and that the TCP connection establishment - * handshake only happens on the first call to otTcpSendByReference(). TCP Fast - * Open can be explicitly disabled using @p aFlags, in which case the TCP - * connection establishment handshake is initiated immediately. + * Caller must wait for `otTcpEstablished` callback indicating that TCP + * connection establishment handshake is done before it can start sending data + * e.g., calling `otTcpSendByReference()`. + * + * The TCP Fast Open is not yet supported and @p aFlags is ignored. * * @param[in] aEndpoint A pointer to the TCP endpoint structure to connect. * @param[in] aSockName The IP address and port of the host to which to connect.