mongoose/docs/c-api/coap.h/mg_coap_send_message.md
Dmitry Frank 849ec1684a Apply Mongoose docs edits by Ev
PUBLISHED_FROM=5cd78790a03580aa23dd3d2d8b825ad449083cc2
2016-07-26 15:06:04 +00:00

630 B

title decl_name symbol_kind signature
mg_coap_send_message() mg_coap_send_message func uint32_t mg_coap_send_message(struct mg_connection *nc, struct mg_coap_message *cm);

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)
  • #define MG_COAP_IGNORE (MG_COAP_ERROR | 0x40000)
  • #define MG_COAP_NOT_ENOUGH_DATA (MG_COAP_ERROR | 0x80000)
  • #define MG_COAP_NETWORK_ERROR (MG_COAP_ERROR | 0x100000)