Limit maximum number of concurrent client connections.
If the connection limit is reached, a DTLS alert “internal_error” is returned
to the client. The client sdk returns
Dtls “internal_error” is defined in RFC 8446 as
“internal_error: An internal error unrelated to the peer or the correctness of the protocol (such as a memory allocation failure) makes it impossible to continue.”
In practice this means it will only occur when the device runs out of resources. The device could run out of resources without the connection limit being reached if the limit is larger than available memory at the time of the connection.
NABTO_DEVICE_DECL_PREFIX NabtoDeviceError NABTO_DEVICE_API nabto_device_limit_connections(NabtoDevice* device, size_t limit)
- [in] The device.
- [in] The maximum number of concurrent connections.
NABTO_DEVICE_EC_OK iff ok