mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-06 15:51:25 +00:00
Apply Mongoose docs edits by Ev
PUBLISHED_FROM=5cd78790a03580aa23dd3d2d8b825ad449083cc2
This commit is contained in:
1 parent
4f210cd8eb
commit
849ec1684a
94 files changed
+509
-491
No files matched your search
@@ -8,6 +8,6 @@ signature: |
|
||||
size_t len);
|
||||
---
|
||||
|
||||
Add new option to mg_coap_message structure.
|
||||
Adds a new option to mg_coap_message structure.
|
||||
Returns pointer to the newly created option.
|
||||
|
||||
@@ -6,6 +6,6 @@ signature: |
|
||||
void mg_coap_free_options(struct mg_coap_message *cm);
|
||||
---
|
||||
|
||||
Free the memory allocated for options,
|
||||
if cm paramater doesn't contain any option does nothing.
|
||||
Frees the memory allocated for options.
|
||||
If the cm paramater doesn't contain any option it does nothing.
|
||||
|
||||
@@ -6,13 +6,13 @@ signature: |
|
||||
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.
|
||||
Parses 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)
|
||||
NOTE: usually CoAP works 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
|
||||
The caller has 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,
|
||||
|
||||
@@ -6,7 +6,7 @@ signature: |
|
||||
uint32_t mg_coap_send_ack(struct mg_connection *nc, uint16_t msg_id);
|
||||
---
|
||||
|
||||
Compose CoAP acknowledgement from `mg_coap_message`
|
||||
and send it into `nc` connection.
|
||||
Composes CoAP acknowledgement from `mg_coap_message`
|
||||
and sends it into `nc` connection.
|
||||
Return value: see `mg_coap_send_message()`
|
||||
|
||||
@@ -7,9 +7,9 @@ signature: |
|
||||
struct mg_coap_message *cm);
|
||||
---
|
||||
|
||||
Compose CoAP message from `mg_coap_message`
|
||||
and send it into `nc` connection.
|
||||
Return 0 on success. On error, it is a bitmask:
|
||||
Composes a CoAP message from `mg_coap_message`
|
||||
and sends it into `nc` connection.
|
||||
Returns 0 on success. On error, it is a bitmask:
|
||||
|
||||
- `#define MG_COAP_ERROR 0x10000`
|
||||
- `#define MG_COAP_FORMAT_ERROR (MG_COAP_ERROR | 0x20000)`
|
||||
|
||||
@@ -6,5 +6,5 @@ signature: |
|
||||
int mg_set_protocol_coap(struct mg_connection *nc);
|
||||
---
|
||||
|
||||
Set CoAP protocol handler - trigger CoAP specific events
|
||||
Sets CoAP protocol handler - triggers CoAP specific events.
|
||||
|
||||
Reference in new issue
Block a user