Thanks Sergio,

1. Can you point me to a description of how to use the different error codes, then?

3. I just located the httpserver_raw in vendor's lwip package. It also doesn't call tcp_accepted. Perhaps the problem is that my vendor is using an outdated version, 1.3.2?




On 5/30/2014 10:47 AM, Sergio R. Caprile wrote:
Hi, following is MY opinion (and experience)

1: Since the callback function is called by the stack as I instructed, I
wouldn´t answer with ERR_ARG, since arg is just as I instructed the
stack to call me... so, if you still do it because you don't trust the
stack, then don't rely on it to stop calling you the wrong way... goto 3;
2: Once you tcp_recvd() those bytes and answer ERR_OK, you are the owner
of the pbuf, you can free it when you want. Remember that that memory
won't be available to hold new packets until you release it.
3: Vendors do what they think will sell more. I wouldn't use their
examples as a learning tool for lwIP. Instead, check the available
examples in the contrib tree: SMTP for a client, netio/httpserver_raw
for a server

Regards



_______________________________________________
lwip-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to