|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|
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.
|[Prev in Thread]||Current Thread||[Next in Thread]|