lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] Aborting and restarting a TCP request


From: Andy Pont
Subject: [lwip-users] Aborting and restarting a TCP request
Date: Fri, 27 Nov 2015 14:28:35 -0000

Hello,

As explained in some of the previous emails I have implemented (using
examples from the internet) a simple HTTP client sat on top of the raw
interface.  The program flow is roughly as follows...

- main() calls a function called http_send_request() which registers the
callback functions and calls tcp_connect()

- The http_send_request() function then sits in a while() loop calling
sys_check_timeouts() waiting for the callbacks.

All is working well and I can process the various HTTP responses that come
back in the receive call back function.  One of the custom HTTP responses is
"wait xx seconds and resend the HTTP request".

Two questions... 

1. When I see this response do I just have to call tcp_close() to clear the
current request?

2. The while() loop is currently just while(1).  What do I need to check to
stop looping when the connection is closed?

Thanks,

Andy.




reply via email to

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