OpenEdv-开源电子网

 找回密码
 立即注册
正点原子全套STM32/Linux/FPGA开发资料,上千讲STM32视频教程免费下载...
查看: 3821|回复: 1

uip超时发送问题?

[复制链接]

1

主题

1

帖子

0

精华

新手上路

积分
26
金钱
26
注册时间
2014-12-2
在线时间
0 小时
发表于 2014-12-2 12:41:41 | 显示全部楼层 |阅读模式
5金钱
uip的udp通信,需求定时往外发送数据。我用超时来处理,即
if(timer_expired(&periodic_timer)) 
{
     //reset_clock_time();
     timer_reset(&periodic_timer);
#if 1
     for(i = 0; i < UIP_UDP_CONNS; i++) 
     {
        uip_udp_periodic(i);
        /* If the above function invocation resulted in data that
            should be sent out on the network, the global variable
            uip_len is set to a value > 0. */
        if(uip_len > 0) {
        uip_arp_out();
        tapdev_send(uip_buf, uip_len);
     }
}
然后在void udp_app_call()中 if( uip_poll() )//定时发送。

可是不知道为什么,发完20~30包之后,就再也发不出数据了?

请教坛里的高手,帮帮忙!

正点原子逻辑分析仪DL16劲爆上市
回复

使用道具 举报

530

主题

11万

帖子

34

精华

管理员

Rank: 12Rank: 12Rank: 12

积分
165540
金钱
165540
注册时间
2010-12-1
在线时间
2117 小时
发表于 2014-12-2 22:55:22 | 显示全部楼层
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则



关闭

原子哥极力推荐上一条 /2 下一条

正点原子公众号

QQ|手机版|OpenEdv-开源电子网 ( 粤ICP备12000418号-1 )

GMT+8, 2025-6-28 13:23

Powered by OpenEdv-开源电子网

© 2001-2030 OpenEdv-开源电子网

快速回复 返回顶部 返回列表