ClearRequestsAndResponses()
Clears requests and responses used by this CoAP agent.
ClearRequests()
Clears requests with specified source address used by this CoAP agent.
AddResource()
Adds a resource to the CoAP server.
RemoveResource()
Removes a resource from the CoAP server.
SetDefaultHandler()
NewMessage()
Allocates a new message with a CoAP header.
NewMessage()
Allocates a new message with a CoAP header.
NewPriorityMessage()
Allocates a new message with a CoAP header that has Network Control priority level.
NewPriorityConfirmablePostMessage()
Allocates and initializes a new CoAP Confirmable Post message with Network Control priority level. The CoAP header is initialized as `kTypeConfirmable` and `kCodePost` with a given URI path and a randomly generated token (of default length). This method also sets the payload marker (`SetPayloadMarker()` on message. Even if message has no payload, calling `SetPayloadMarker()` is harmless, since `SendMessage()` will check and remove the payload marker when there is no payload.
NewConfirmablePostMessage()
Allocates and initializes a new CoAP Confirmable Post message with normal priority level. The CoAP header is initialized as `kTypeConfirmable` and `kCodePost` with a given URI and a randomly generated token (of default length). This method also sets the payload marker (calling `SetPayloadMarker()`). Even if message has no payload, calling `SetPayloadMarker()` is harmless, since `SendMessage()` will check and remove the payload marker when there is no payload.
NewPriorityNonConfirmablePostMessage()
Allocates and initializes a new CoAP Non-confirmable Post message with Network Control priority level. The CoAP header is initialized as `kTypeNonConfirmable` and `kCodePost` with a given URI and a randomly generated token (of default length). This method also sets the payload marker (calling `SetPayloadMarker()`). Even if message has no payload, calling `SetPayloadMarker()` is harmless, since `SendMessage()` will check and remove the payload marker when there is no payload.
NewNonConfirmablePostMessage()
Allocates and initializes a new CoAP Non-confirmable Post message with normal priority level. The CoAP header is initialized as `kTypeNonConfirmable` and `kCodePost` with a given URI and a randomly generated token (of default length). This method also sets the payload marker (calling `SetPayloadMarker()`). Even if message has no payload, calling `SetPayloadMarker()` is harmless, since `SendMessage()` will check and remove the payload marker when there is no payload.
NewPriorityResponseMessage()
Allocates and initializes a new CoAP response message with Network Control priority level for a given request message. The CoAP header is initialized as `kTypeAck` with `kCodeChanged`. The token and message ID is copied from @p aRequest. This method also sets the payload marker (calling `SetPayloadMarker()`). Even if message has no payload, calling `SetPayloadMarker()` is harmless, since `SendMessage()` will check and remove the payload marker when there is no payload.
NewResponseMessage()
Allocates and initializes a new CoAP response message with regular priority level for a given request message. The CoAP header is initialized as `kTypeAck` with `kCodeChanged`. The token and message ID is copied from @p aRequest. This method also sets the payload marker (calling `SetPayloadMarker()`). Even if message has no payload, calling `SetPayloadMarker()` is harmless, since `SendMessage()` will check and remove the payload marker when there is no payload.
SendMessage()
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.
SendMessage()
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.
SendMessage()
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.
SendMessage()
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.
SendReset()
Sends a CoAP reset message.
Sends header-only CoAP response message.
SendAck()
Sends a CoAP ACK empty message which is used in Separate Response for confirmable requests.
SendEmptyAck()
Sends a CoAP ACK message on which a dummy CoAP response is piggybacked.
SendEmptyAck()
Sends a CoAP ACK message on which a dummy CoAP response is piggybacked.
SendNotFound()
Sends a header-only CoAP message to indicate no resource matched for the request.
AbortTransaction()
Aborts CoAP transactions associated with given handler and context. The associated response handler will be called with kErrorAbort.
SetInterceptor()
Sets interceptor to be called before processing a CoAP packet.
GetRequestMessages() const
Returns a reference to the request message list.
GetCachedResponses() const
Returns a reference to the cached response list.
Receive()
Receives a CoAP message.
SetResourceHandler()
Sets the resource handler function.
InitMessage()
InitResponse()
HandleRetransmissionTimer()
HandleRetransmissionTimer()
ClearRequests()
Clears requests with specified source address used by this CoAP agent.
CopyAndEnqueueMessage()
DequeueMessage()
FinalizeCoapTransaction()
ProcessReceivedRequest()
ProcessReceivedResponse()
SendCopy()
SendEmptyMessage()
Send()