mirror of
https://github.com/cesanta/mongoose.git
synced 2024-12-14 00:31:42 +08:00
23122b327c
It would be probably good idea to also remove tools/docgen.py and asciidoc.mk, but asciidoc.mk is still mentioned under `cloud/doc`, which may contain some useful info which we'll need at least to review before removing. PUBLISHED_FROM=faf454d4c52a2f07ea8ac084cf0bd11a0c9c9b3b
662 B
662 B
title | decl_name | symbol_kind | signature |
---|---|---|---|
mg_coap_parse() | mg_coap_parse | func | uint32_t mg_coap_parse(struct mbuf *io, struct mg_coap_message *cm); |
Parse COAP message and fills mg_coap_message and returns cm->flags. This is a helper function.
NOTE: usually CoAP work over UDP, so lack of data means format error, but in theory it is possible to use CoAP over TCP (according to RFC)
The caller have to check results and treat COAP_NOT_ENOUGH_DATA according to underlying protocol:
- in case of UDP COAP_NOT_ENOUGH_DATA means COAP_FORMAT_ERROR,
- in case of TCP client can try to receive more data
Return value: see mg_coap_send_message()