|
From: | address@hidden |
Subject: | Re: [lwip-users] How to detect a FIN from the remote side |
Date: | Mon, 07 Dec 2009 22:10:35 +0100 |
User-agent: | Thunderbird 2.0.0.23 (Macintosh/20090812) |
Marco Jakobs wrote:
Hi Simon, i have seen this, but i'm not using the raw api
Sorry, my fault, didn't see that :-)
- which is also not recommended in a multithread environment ...Hmm, I wouldn't put it like that. If you want top speed, the raw API is your friend. But to many users, it's more complicated to write applications for (since you write a state machine, not sequential code).
so i asked for a way using the "normal" API which is used in my server task.
... and by "normal", I take it you mean the netconn API ;-)The simple solution is: netconn_recv will return NULL and conn->err will be ERR_CLSD. Actually it's a bad limitation in the netconn API which will change with 1.4.0: netconn_recv will then return an err_t which will tell you it's closed.
Simon
[Prev in Thread] | Current Thread | [Next in Thread] |