ot::MeshCoP::SecureTransport::SetMaxConnectionAttempts() method
Sets the maximum number of allowed connection requests before socket is automatically closed. This method can be called when socket is closed. Otherwise `kErrorInvalidSatet` is returned. If @p aMaxAttempts is zero, no limit is applied and connections are allowed until the socket is closed. This is the default behavior if `SetMaxConnectionAttempts()` is not called.
Arguments
aMaxAttempts
Maximum number of allowed connection attempts.
aCallback
Callback to notify when max number of attempts has reached and socket is closed.
aContext
A pointer to arbitrary context to use with `AutoCloseCallback`.
Return value
kErrorNone Successfully set the maximum allowed connection attempts and callback. kErrorInvalidState Socket is not closed.
ot::MeshCoP::SecureTransport::SetMaxConnectionAttempts() calls 1 function:
![]()
ot::MeshCoP::SecureTransport::SetMaxConnectionAttempts()
ot::MeshCoP::SecureTransport::SetMaxConnectionAttempts() reads 2 variables and writes 1 variable:
![]()
ot::MeshCoP::SecureTransport::SetMaxConnectionAttempts()