Loading...
Searching...
No Matches
unicoap_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 544 of file server.h.

#include <server.h>

Data Fields

const unicoap_resource_tresources
 Reference to contiguous array of resource belonging to this listener.
 
size_t resource_count
 The number of resources belonging in this listener.
 
unicoap_request_matcher_t request_matcher
 Function that picks a suitable request handler from a request.
 
unicoap_link_encoder_t link_encoder
 Encoder for Constrained RESTful Environments (CoRE) Link Format.
 
unicoap_listener_tnext
 Next listener in linked list.
 
unicoap_proto_set_t protocols
 Allowed protocols for the resources grouped together by this resource.
 

Field Documentation

◆ link_encoder

unicoap_link_encoder_t unicoap_listener::link_encoder

Encoder for Constrained RESTful Environments (CoRE) Link Format.

Definition at line 569 of file server.h.

◆ next

unicoap_listener_t* unicoap_listener::next

Next listener in linked list.

Definition at line 574 of file server.h.

◆ protocols

unicoap_proto_set_t unicoap_listener::protocols

Allowed protocols for the resources grouped together by this resource.

Example: Set to UNICOAP_PROTOCOL_FLAG(UNICOAP_PROTO_UDP) | UNICOAP_PROTOCOL_FLAG(UNICOAP_PROTO_DTLS) to allow only CoAP over UDP and DTLS. Alternatively you can use UNICOAP_PROTOCOLS(UNICOAP_PROTO_UDP, UNICOAP_PROTO_DTLS).

See also
unicoap_proto_set_t, UNICOAP_PROTOCOL_FLAG, UNICOAP_PROTOCOLS, UNICOAP_PROTOCOLS_ALLOW_ALL, and UNICOAP_PROTOCOLS_ALLOW_NONE

Definition at line 586 of file server.h.

◆ request_matcher

unicoap_request_matcher_t unicoap_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 resource_count fields).

Definition at line 564 of file server.h.

◆ resource_count

size_t unicoap_listener::resource_count

The number of resources belonging in this listener.

Definition at line 553 of file server.h.

◆ resources

const unicoap_resource_t* unicoap_listener::resources

Reference to contiguous array of resource belonging to this listener.

Definition at line 548 of file server.h.


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