ot::Coap::Message::GenerateRandomToken() method
Sets the Token length and randomizes its value.
Arguments
aTokenLength
The Length of a Token to set.
Return value
kErrorNone Successfully set the token value. kErrorNoBufs Insufficient message buffers available to set the token value.