CoAP: add default request handler (#1718)

This commit is contained in:
Giedrius
2017-05-15 12:01:21 -07:00
committed by Jonathan Hui
parent 7049af1082
commit 8fa20a51f1
4 changed files with 38 additions and 1 deletions
+9
View File
@@ -487,6 +487,15 @@ ThreadError otCoapAddResource(otInstance *aInstance, otCoapResource *aResource);
*/
void otCoapRemoveResource(otInstance *aInstance, otCoapResource *aResource);
/**
* This function sets the default handler for unhandled CoAP requests.
*
* @param[in] aInstance A pointer to an OpenThread instance.
* @param[in] aHandler A function pointer that shall be called when an unhandled request arrives.
* @param[in] aContext A pointer to arbitrary context information. May be NULL if not used.
*/
void otCoapSetDefaultHandler(otInstance *aInstance, otCoapRequestHandler aHandler, void *aContext);
/**
* This function sends a CoAP response from the server.
*