Any ideas why C is waiting for keep-alive timeout (disconnection of socet) when reading last buffer? I mean i got this code:
Simple... request is HTTP request with Keep-Alive set to 30 seconds.
But... what it does is:...
- prints first buffer (first 1024 bytes) with no visible delay
- prints second buffer (second 1024 bytes) with no visible delay
- prints third buffer (its not full 1024, its 768 bytes) after 30 seconds of delay (after disconnect from server side, cose keep-alive ended).
Any idea how to fix it, so it wouldn't wait for connection close? I would like to send another data on same connection(!)
With connection:close it works ok, shows reply in no-time.