[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] tcp echo example

From: M. Manca
Subject: [lwip-users] tcp echo example
Date: Fri, 01 Aug 2014 09:54:07 +0200
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0

Hi all,

I tryed the 'standard' echo example using raw sockets and in my configuration it works but sends each message 2 times.
I debugged it and I found that the 2nd time the message is always sent inside the callback function for the received message (the echo replied by the echo server). Considering that the pbuf_free() is executed in the send function I really don't understand why it is already valid when the sent callback is executed. Its address is not null and the content of the payload is always the echo message.

If I remove the tcp_write() inside the message sent callback everything works fine.
I don't understand also why there is the tcp_write() inside the callback considering that every action to receive and transmit a packet is done every 250 milliseconds calling    sys_check_timeouts() and  ethernetif_input(eth0Netif).

Is it normal? Wasn't updated the example?
Any answer/help will be appreciated.

I am using lwip 1.4.1 on a NXP LPC1769 on an EA AOAA board using the echo example to test the troughput of the network.

Massimo Manca
, Micron Engineering

via della Ferriera, 48 33170 Pordenone PN ITALIA
Tel: 39 0434 1856131 | Mobile: 39 349 4504979
Twitter LinkedIn SlideShare
Contact me: Skype micron.engineering

Questa e-mail è priva di virus e malware perché è attiva la protezione avast! Antivirus .

Attachment: m_manca.vcf
Description: Vcard

reply via email to

[Prev in Thread] Current Thread [Next in Thread]