打印

stm32f207裸跑LWip

[复制链接]
287|0
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
没名字的人|  楼主 | 2018-6-30 21:44 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
发送数据的时候,超过1500个字节数据丢失? void client_send(uint8 *pdata_buf, uint16 size)
{
         struct pbuf *p_tx;

        if (ConnectState == NET_UNLINK)
                return;
        if (ptcp_client == NULL)
                return;

         if ((pdata_buf != NULL) && (size > 0)) {
                p_tx = pbuf_alloc(PBUF_TRANSPORT, size , PBUF_POOL);
                if (p_tx != NULL) {
                        /* copy data to pbuf */
                        pbuf_take(p_tx, (char*)pdata_buf, size);
                        if (ptcp_client->p_tx == NULL)
                                ptcp_client->p_tx = p_tx;
                        else
                                pbuf_cat(ptcp_client->p_tx, p_tx);
                        tcp_client_send(pClientPcb, ptcp_client);
                }
        }
}

使用特权

评论回复

相关帖子

发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

420

主题

432

帖子

0

粉丝