lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Aborting and restarting a TCP request


From: Sergio R. Caprile
Subject: Re: [lwip-users] Aborting and restarting a TCP request
Date: Mon, 30 Nov 2015 09:46:31 -0300
User-agent: Mozilla/5.0 (Windows NT 5.1; rv:38.0) Gecko/20100101 Thunderbird/38.3.0

Please read the wiki; your error callback will be called or an error
condition signalled on your receive callback when the connection is lost.
Your problem with resending requests seems to be the subtleties of the
HTTP and TCP protocols. In TCP, you either have a connection established
and can send data, or you don't. If you need to close the connection,
then call the close function, if you need to send data again, just call
the send data function with the same data, there is no way to unsend or
cancel.
AFAIK, in HTTP/1.0 when you "resend an HTTP request" you make a new TCP
connection, but as HTTP/1.1 supports persistent connections, you might
be able to do otherwise if you want to and the server supports it.
However, that is beyond my knowledge.
I would close the connection at the "wait and resend", then wait, and
open a new connection to resend. But I could be totally wrong.
Have you tried actually using an actual client and sniffing the traffic
with wireshark or equivalent to see what an actual client actually does ?
-- 




reply via email to

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