lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] Advanced raw API questions.


From: ella
Subject: [lwip-devel] Advanced raw API questions.
Date: Fri, 15 Nov 2013 20:42:44 -0800 (PST)

Hi,
I have posted a below question in lwip-user but seams nobody where can
answer it. So I repost here.
  
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 feellings. 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-raw-API-questions-tp22053.html
Sent from the lwip-devel mailing list archive at Nabble.com.



reply via email to

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