CONFIG_NET_SOCKETS_DTLS_TIMEOUT

Timeout value in milliseconds for DTLS connection

Type: int

Help

This variable specifies time in milliseconds after which DTLS connection is considered dead by TLS server and DTLS resources are freed. This is needed to prevent situation when DTLS client shuts down without closing connection gracefully, which can prevent other peers from connecting. Value of 0 indicates no timeout - resources will be freed only when connection is gracefully closed by peer sending TLS notification or socket is closed.

Direct dependencies

NET_SOCKETS_ENABLE_DTLS && NET_SOCKETS && NETWORKING

(Includes any dependencies from ifs and menus.)

Default

  • 5000

Kconfig definition

At <Zephyr>/subsys/net/lib/sockets/Kconfig:80

Included via <Zephyr>/Kconfig:8<Zephyr>/Kconfig.zephyr:34<Zephyr>/subsys/Kconfig:34<Zephyr>/subsys/net/Kconfig:89<Zephyr>/subsys/net/lib/Kconfig:30

Menu path: (Top) → Sub Systems and OS Services → Networking → Link layer and IP networking support → Network Libraries → BSD Sockets compatible API → Enable DTLS socket support [EXPERIMENTAL]

config NET_SOCKETS_DTLS_TIMEOUT
    int "Timeout value in milliseconds for DTLS connection"
    default 5000
    depends on NET_SOCKETS_ENABLE_DTLS && NET_SOCKETS && NETWORKING
    help
      This variable specifies time in milliseconds after which DTLS
      connection is considered dead by TLS server and DTLS resources are
      freed. This is needed to prevent situation when DTLS client shuts down
      without closing connection gracefully, which can prevent other peers
      from connecting. Value of 0 indicates no timeout - resources will be
      freed only when connection is gracefully closed by peer sending TLS
      notification or socket is closed.

(The ‘depends on’ condition includes propagated dependencies from ifs and menus.)