[riot-notifications] [RIOT-OS/RIOT] gcoap: multi-transport support (#16688)

benpicco notifications at github.com
Wed Aug 25 18:36:56 CEST 2021


Another option would be to just duplicate the endpoint

```C
/* Internal variables */
const coap_resource_t _default_resources[] = {
    { "/.well-known/core", COAP_GET, _well_known_core_handler, GCOAP_SOCKET_TYPE_UDP },
};

const coap_resource_t _default_secure_resources[] = {
    { "/.well-known/core", COAP_GET, _well_known_core_handler, GCOAP_SOCKET_TYPE_DTLS },
};

static gcoap_listener_t _default_listener = {
    &_default_resources[0],
    ARRAY_SIZE(_default_resources),
    GCOAP_SOCKET_TYPE_UDP,
    NULL,
    NULL,
    _request_matcher_default
};

static gcoap_listener_t _default_secure_listener = {
    &_default_resources[0],
    ARRAY_SIZE(_default_secure_resources),
    GCOAP_SOCKET_TYPE_DTLS,
    NULL,
    NULL,
    _request_matcher_default
};
```

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/16688#issuecomment-905694253
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210825/3236f9cc/attachment.htm>


More information about the notifications mailing list