From ca471869a7d2e964f4e58a88563b322d7e2f348e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eivind=20J=C3=B8lsgard?= Date: Tue, 20 Feb 2024 14:49:28 +0100 Subject: [PATCH] nrf_modem: doc: update NRF_SO_RCVTIMEO for accept MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The NRF_SO_RCVTIMEO is used to set the timeout in accept. Signed-off-by: Eivind Jølsgard --- nrf_modem/doc/sockets/socket_options_func.rst | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/nrf_modem/doc/sockets/socket_options_func.rst b/nrf_modem/doc/sockets/socket_options_func.rst index 28c66bc491..2f725dc60f 100644 --- a/nrf_modem/doc/sockets/socket_options_func.rst +++ b/nrf_modem/doc/sockets/socket_options_func.rst @@ -49,7 +49,7 @@ The following table shows all socket options supported by the Modem library. +-----------------+---------------------------------+------------------------+------------+--------------------------------------------------------------------------------------------+ | NRF_SOL_SOCKET | NRF_SO_REUSEADDR | ``int`` | set | Non-zero requests reuse of local addresses in :c:func:`nrf_bind` (protocol-specific). | +-----------------+---------------------------------+------------------------+------------+--------------------------------------------------------------------------------------------+ -| NRF_SOL_SOCKET | NRF_SO_RCVTIMEO | ``struct nrf_timeval`` | get/set | Timeout value for a socket receive operation. | +| NRF_SOL_SOCKET | NRF_SO_RCVTIMEO | ``struct nrf_timeval`` | get/set | Timeout value for a socket receive and accept operation. | +-----------------+---------------------------------+------------------------+------------+--------------------------------------------------------------------------------------------+ | NRF_SOL_SOCKET | NRF_SO_SNDTIMEO | ``struct nrf_timeval`` | get/set | Timeout value for a socket send operation. | +-----------------+---------------------------------+------------------------+------------+--------------------------------------------------------------------------------------------+ @@ -111,10 +111,11 @@ NRF_SO_REUSEADDR The default value for :c:macro:`NRF_SO_REUSEADDR` is ``off``, that is, reuse of local addresses is not permitted. NRF_SO_RCVTIMEO - Set a timeout value for the :c:func:`nrf_recv` and :c:func:`nrf_recvfrom` operations. + Set a timeout value for the :c:func:`nrf_recv`, :c:func:`nrf_recvfrom` and :c:func:`nrf_accept` operations. This option accepts an :c:struct:`nrf_timeval` structure with a number of seconds and microseconds specifying the limit on how long to wait for an input operation to complete. If a receive operation has blocked for this much time without receiving additional data, it returns with a partial count, or ``errno`` is set to ``NRF_EAGAIN`` or ``NRF_EWOULDBLOCK`` if no data were received. - The default for this option is the value ``0``, which indicates that a receive operation will not time out. + If an accept operation has blocked for this much time without receiving an incomming connection, it returns an error and ``errno`` is set to ``NRF_EAGAIN``. + The default for this option is the value ``0``, which indicates that a receive or accept operation will not time out. .. note:: The minimum supported resolution is 1 millisecond.