Hi, Before I dive in to source code and spend hours I decided to ask people here a few questions:
1. After issuing tcp_output and getting ERR_OK in return am I guaranteed to get ANY tcp_sent callback? In what cases there will be no callback? What if disconnect happened or there is no ACK from remote peer? In my server implementation it's thread blocks waiting for sent callback and I'm not sure if I'm not risking to get stuck where forever. 2. API says that after tcp_close I still can receive data on the disconnected pcb. What does it mean? Should I expect to get tcp_recv callback even after tcp_close? When can I free resources allocated for such closed connection and be sure nothing will happen anymore with it? 3. tcp_recv callback gets err argument. What kind of error should I expect where and how to deal with it? 4. Are tcp_* functions thread safe? I mean can I have server running in separate thread and make calls to tcp_* functions from that thread and not from callback running in native tcp thread? Thanks. Just a few fillings. I tried to implement own TCP server based on raw API and actually got it working but it looks pretty complex as I'm trying to take care of all possible cases. I found out that it is not trivial to sync between callback and server thread. So I've started to look at netconn API assuming that same job was done and was TESTED already. Especially considering the fact that I will need a number of different servers in my application to implement external interfaces. -- View this message in context: http://lwip.100.n7.nabble.com/Advanced-lwip-raw-API-questions-tp22050.html Sent from the lwip-users mailing list archive at Nabble.com. _______________________________________________ lwip-users mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/lwip-users
