Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ MT-multithreading and servers » [SOLVED]HttpRequest will hang at ReadingBody() until timeout When KeepAlive is set
[SOLVED]HttpRequest will hang at ReadingBody() until timeout When KeepAlive is set [message #49775] Mon, 30 April 2018 14:50 Go to next message
kasome is currently offline  kasome
Messages: 78
Registered: July 2008
Location: Taiwan
Member
Hi,

Can HttpRequest get Content-Length=0 from response header instead of reading EOF from the server to confirm the requested operation is done When KeepAlive is set to true ?


From RFC2616
Persistent HTTP connections have a number of advantages : Smile
Quote:


- By opening and closing fewer TCP connections, CPU time is saved
in routers and hosts (clients, servers, proxies, gateways,
tunnels, or caches), and memory used for TCP protocol control
blocks can be saved in hosts.

- HTTP requests and responses can be pipelined on a connection.
Pipelining allows a client to make multiple requests without
waiting for each response, allowing a single TCP connection to
be used much more efficiently, with much lower elapsed time.

- Network congestion is reduced by reducing the number of packets
caused by TCP opens, and by allowing TCP sufficient time to
determine the congestion state of the network.

- Latency on subsequent requests is reduced since there is no time
spent in TCP's connection opening handshake.

- HTTP can evolve more gracefully, since errors can be reported
without the penalty of closing the TCP connection. Clients using
future versions of HTTP might optimistically try a new feature,
but if communicating with an older server, retry with old
semantics after an error is reported.


any suggest will be welcome, thanks in advance Smile

[Updated on: Fri, 11 May 2018 08:10]

Report message to a moderator

Re: [FeatureRequests]HttpRequest will hang at ReadingBody() until timeout When KeepAlive is set [message #49800 is a reply to message #49775] Tue, 08 May 2018 14:28 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Hopefully fixed, please check.

Mirek
Re: [FeatureRequests]HttpRequest will hang at ReadingBody() until timeout When KeepAlive is set [message #49822 is a reply to message #49800] Fri, 11 May 2018 08:14 Go to previous message
kasome is currently offline  kasome
Messages: 78
Registered: July 2008
Location: Taiwan
Member
Works like a charm Very Happy. Thanks a lot.

[Updated on: Fri, 11 May 2018 08:14]

Report message to a moderator

Previous Topic: Some questions about Skylark
Next Topic: Linking simple Skylark application under Windows
Goto Forum:
  


Current Time: Tue Apr 23 13:09:17 CEST 2024

Total time taken to generate the page: 0.01919 seconds