curl-users
Re: Multiple HTTP GETs in one TCP message
Date: Thu, 02 Nov 2006 11:58:13 +0100
Alex Ferenstein schrieb:
>
>>> I would like use cURL to send more than one HTTP GET inside a single TCP
>>> message, is this possible with cURL?
>
>> Is this a pipeline question??
>
> Yes. Is it possible to do HTTP pipelining with current cURL syntax?
Doesn't this happen automatically already?
% curl -v http://localhost/A http://localhost/B 2>&1 | grep "^\*"
* About to connect() to localhost port 80
* Trying ::1... connected
* Connected to localhost (::1) port 80
* Re-using existing connection! (#0) with host localhost
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
* Connected to localhost (::1) port 80
* Closing connection #0
To remove confusion:
There is no such thing as a "TCP message". There is such a thing
as an IP packet, but you don't really care how many IP packets your
TCP stream requires (at least 5 for proper connections ;-)).
What you want to do is to reuse connections. cURL already does this
(see above).
Cheers,
Peter
Received on 2006-11-02