[lwip-users] tcp echo example

2014-08-01 Thread M. Manca
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).

Re: [lwip-users] tcp echo example

2014-08-01 Thread Sergio R. Caprile
Hi, when you say echo example, do you mean the echo example in the contrib tree or some vendor distributed (and probably modified) file ? 'cause i've run the echo example from the 1.4.1 contrib tree some weeks ago and I don't recall seeing anything strange. And btw, I don't see anything close to

Re: [lwip-users] tcp echo example

2014-08-01 Thread M. Manca
Il 01/08/2014 20:35, Sergio R. Caprile ha scritto: Hi, when you say echo example, do you mean the echo example in the contrib tree or some vendor distributed (and probably modified) file ? 'cause i've run the echo example from the 1.4.1 contrib tree some weeks ago and I don't recall seeing

Re: [lwip-users] tcp echo example

2014-08-01 Thread Sergio R. Caprile
Not really. tcp_write() allocates an internal pbuf itself, but you can only send 3 times in a row if yu have enough memory, and as TCP works, there is no concept of packet and no need to call 3 times in a row. You have a sndbuf and you can send as much as you can fit inside that sndbuf for that

Re: [lwip-users] tcp echo example

2014-08-01 Thread M. Manca
Il 01/08/2014 23:46, Sergio R. Caprile ha scritto: Not really. tcp_write() allocates an internal pbuf itself, but you can only send 3 times in a row if yu have enough memory, and as TCP works, there is no concept of packet and no need to call 3 times in a row. I mean a different thing. I said