1 netbuf 2 netconn 3 NETCONNAPI http eboard
目录 1 数据缓冲区—netbuf 2 连接结构—netconn 3 NETCONN接口API函数 淘宝店铺:http: //eboard. taobao. com 技术论坛
1、数据缓冲区—netbuf 有关netbuf的API函数如下: 1、netbuf_new() 2、netbuf_delete() 3、netbuf_alloc() 4、netbuf_free() 5、netbuf_ref() 6、netbuf_chain() 7、netbuf_data() 8、netbuf_next() 9、netbuf_first() 淘宝店铺:http: //eboard. taobao. com 技术论坛
2、连接结构—netconn 在使用NETCONN接口的时候不管你是UDP还是TCP统一使用一个连接结构— netconn,这样应用程序就可以忽略掉连接类型的差异,使用统一的连接结构和编程 函数,在api. h中定义了netconn结构体。 struct netonn { enum netconn_type; enum netconn_state; union{ struct ip_pcb *ip; struct tcp_pcb *tcp; struct udp_pcb *udp; struct raw_pcb *raw; } pcb; err_t last_err; sys_sem_t op_completed; ……. } 淘宝店铺:http: //eboard. taobao. com 技术论坛
3、NETCONN接口API函数 在文件api_lib. c为netconn接口的API函数,如下: 1、netconn_new() 2、netconn_delete() 3、netconn_getaddr() 4、netconn_bind() 5、netconn_connect() 6、netconn_disconnect() 7、netconn_listen() 8、netconn_accept() 9、netconn_recv() 10、netconn_send() 11、netconn_write() 12、netconn_close() 此函数为一个宏 淘宝店铺:http: //eboard. taobao. com 技术论坛
- Slides: 11