|
From: | Bonny Gijzen |
Subject: | [lwip-users] about tcp disconnections |
Date: | Thu, 21 Oct 2004 11:57:42 -0000 |
Hi 2 all,
I am having problems when the other side suddenly decides to close
the
connection (for whatever reason). I detect it (pbuf==NULL) and I call tcp_close() and do some cleanup. Some small time later my client needs to talk to the server again, it sees the connection was closed (I use a global state structure) and tries to reconnect. The connection cannot be established anymore (dunno why) so it hangs at that point. This scheme has worked in the past (although code was a little different) so maybe it is my mistake, but because I dont know what to do exactly it is still guesswork from my point of view. Is there anybody who can show some client code (using raw api) which connects to a server when it needs to talk, and when the server closes the connection, then the client tries to reconnect the next time it needs to talk ? *************** I am using lwip 1.0.0 and I have ported it to a 32bit machine. I did need to tweak the code for the misaligned address reads, but I still think I have missed something (because on a rare occasion the data gets corrupted on the other end). Is there anybody who also has ported lwip to a 16bit or 32bit machine? And what routines have been modified? Perhaps it would be interesting to have a small section on the lwip website which explains which routines/code needs to be altered for 16/32 bit machines, and perhaps show some modified code already (i.e. which uses byte accesses instead of 16/32 bit access for example). Rgs Bonny,
|
[Prev in Thread] | Current Thread | [Next in Thread] |