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 subsys/net/lib/sockets/Kconfig:64

Included via Kconfig:8Kconfig.zephyr:44subsys/Kconfig:22subsys/net/Kconfig:82subsys/net/lib/Kconfig:28

Menu path: (Top) → Networking → Link layer and IP networking support → Network Libraries → BSD Sockets compatible API → Enable TCP TLS socket option support [EXPERIMENTAL] → 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.)