You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: nrf_modem/doc/sockets/pdn.rst
+10-1Lines changed: 10 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -54,9 +54,18 @@ Handling PDN errors on sockets
54
54
******************************
55
55
56
56
During operation, an active PDN connection may be deactivated due to loss of connectivity or other reasons.
57
+
58
+
The following applies to sockets that have set the :c:macro:`NRF_SO_KEEPOPEN` socket option:
59
+
60
+
The loss of an active PDN connection will not result in errors.
61
+
Socket operations can return errors due to lack of PDN connectivity.
62
+
Upon PDN reactivation, the socket is functional and can resume its operations.
63
+
The application is responsible for detecting and re-attempting operations that fail while the socket does not have an active PDN.
64
+
65
+
The following applies to sockets that have not set the :c:macro:`NRF_SO_KEEPOPEN` socket option:
66
+
57
67
When a socket operation is attempted on a socket that no longer has an active PDN connection, the operation will return ``-1`` and set ``errno`` to ``NRF_ENETDOWN``.
58
68
If the socket is being polled, the :c:func:`nrf_poll` function will set the ``POLLERR`` flag and set the socket error to ``NRF_ENETDOWN``.
59
69
The socket error can be retrieved using the :c:macro:`NRF_SO_ERROR` socket option.
60
-
61
70
When the ``NRF_ENETDOWN`` error is detected, the socket is no longer usable and must be closed by the application.
62
71
The application is responsible for detecting when the PDN connection is activated again, before re-creating the socket and attempting the failed operation again.
0 commit comments