ot::Coap::CoapBase::SendMessage() method
Sends a CoAP message with custom transmission parameters. If a response for a request is expected, respective function and context information should be provided. If no response is expected, these arguments should be `nullptr` pointers. If Message ID was not set in the header (equal to 0), this method will assign unique Message ID to the message.
Arguments
aMessage
A reference to the message to send.
aMessageInfo
A reference to the message info associated with @p aMessage.
aTxParameters
A reference to transmission parameters for this message.
aHandler
A function pointer that shall be called on response reception or time-out.
aContext
A pointer to arbitrary context information.
Return value
kErrorNone Successfully sent CoAP message. kErrorNoBufs Insufficient buffers available to send the CoAP message.