gcoap_listener Struct Reference

A modular collection of resources for a server. More...

Detailed Description

A modular collection of resources for a server.

Definition at line 649 of file gcoap.h.

#include <gcoap.h>

Data Fields

const coap_resource_tresources
 First element in the array of resources; must order alphabetically.
 
size_t resources_len
 Length of array.
 
gcoap_link_encoder_t link_encoder
 Writes a link for a resource.
 
struct gcoap_listenernext
 Next listener in list.
 
gcoap_request_matcher_t request_matcher
 Function that picks a suitable request handler from a request. More...
 

Field Documentation

◆ request_matcher

gcoap_request_matcher_t gcoap_listener::request_matcher

Function that picks a suitable request handler from a request.

Note
Leaving this NULL selects the default strategy that picks handlers by matching their Uri-Path to resource paths (as per the documentation of the resources and resources_len fields). Alternative handlers may cast the resources and resources_len fields to fit their needs.

Definition at line 666 of file gcoap.h.


The documentation for this struct was generated from the following file: