ot::Coap::CoapSecure::SendMessage() method
Sends a CoAP message over secure DTLS connection. 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 function will assign unique Message Id to the message.
Arguments
aMessage
A reference to the message to send.
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 Failed to allocate retransmission data. kErrorInvalidState DTLS connection was not initialized.
ot::Coap::CoapSecure::SendMessage() calls 1 function:
![]()
ot::Coap::CoapSecure::SendMessage()
ot::Coap::CoapSecure::SendMessage() reads 2 variables:
![]()
ot::Coap::CoapSecure::SendMessage()