![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
网络
yangkunhenry
阿猫
展开
-
libcoap(一)
server.c中从网络端来看,还是一个基于UDP的网络程序创建socketctx = get_context(addr_str, port_str); if (!ctx) return -1;ctx = coap_new_context(&addr);c->sockfd = socket(listen_addr->addr.s...原创 2018-05-03 15:51:45 · 2053 阅读 · 0 评论 -
libcoap(二)
从协议的角度结合代码来看 看下coap_context_t object 在main函数中首先定义了这个结构体变量指针 coap_context_t *ctx; 看下其定义:/** The CoAP stack's global state is stored in a coap_context_t object */typedef struct coap_context_t ...原创 2018-05-04 11:24:27 · 1346 阅读 · 0 评论 -
libcoap(三) struct coap_context_t
coap_context_t中第二个成员变量 struct coap_resource_t *resources;/** The CoAP stack's global state is stored in a coap_context_t object */typedef struct coap_context_t { coap_opt_filter_t known_option...原创 2018-05-04 14:04:48 · 1469 阅读 · 0 评论