Closed snaami closed 2 years ago
Hello, thank you for the answer,
I'm already using PIPELINE flags, and it's working when the server return a 200 OK code, but if the server return code is http 401 the TCP is closed and a new one is opened the next lws_client_connect_via_info(lws_connect_info)
.
Note : I'm using lws 4.2.0
Http/2 separates the tcp connection lifetime from the fate of an individual transaction more clearly and should be ok with that. h1 pipelining requires, eg, something consume the 401 body even if it doesn't care and is basically a hack in the protocol.
Yes I have http1 being used here , I cant use http2 restriction of the cwmp protocol .Tank you for the explanation
Hello,
Simple question :
Is it possible to keep the TCP session alive after calling
lws_wsi_close(wsi, LWS_TO_KILL_ASYNC);
?I have a scenario where the server require authentication to be used, so my client must resend the same message again with auth info in the headers, to do that I just close the current wsi and then in the close callback I schedule a new call to
lws_client_connect_via_info(lws_connect_info)
where I can add auth and some custom headers. This approach works very well but the protocol I'm trying to use has a requirement that the TCP should not get closed in this case and the same TCP session must be reused it's a (cwmp tr69 protocol) but by doing this the TCP is closed and a new TCP session is started.