6627| 5
|
LWIP udp netconn 怎么接收广播 |
5金钱
最佳答案恩,我实现了,我用的是
g_pcb = udp_new();
udp_bind(g_pcb,IP_ADDR_BROADCAST,UDP_DEMO_PORT);
udp_recv(g_pcb,udp_server_recv,NULL);
void udp_server_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p,struct ip_addr *addr, u16_t port)
{
struct ip_addr destAddr = *addr;
destipaddr2 = *addr;
if(p != NULL)
{
printf("\r\nIP:%d.%d.%d.%d",((uint32_t)(destAddr.addr)>>0&0xff),((uint32_t)(d ...
| ||
| ||
| ||
发表于 2017-7-19 01:55:13
|
显示全部楼层
| ||
发表于 2017-7-19 10:23:32
|
显示全部楼层
| ||
发表于 2017-10-9 18:52:21
|
显示全部楼层
| ||
|手机版|OpenEdv-开源电子网 ( 粤ICP备12000418号-1 )
GMT+8, 2024-11-24 22:27
Powered by OpenEdv-开源电子网
© 2001-2030 OpenEdv-开源电子网