Thursday, February 8, 2007

HTTP, CURL and stuff

News, news, yawn.


Daniel Stenberg, head of the cURL project, accepted a patch for sub second time out support within libcurl. That means that you can use float values as time outs with a millisecond resolution, as soon as you use libcurl >= v7.16.2, that is, a minimum supported time out of 0.001 seconds (which is not reasonable, just in case you wonder). On a side note, you should build libcurl with c-ares to get working sub second DNS lookup time out support, AFAICT.


Clay Loveless, usually killing people softly with his random strings, mashing up APIs or providing compatibility libraries, kindly asked me, if there were persistent connection support in pecl/http.


Is there an option in pecl_http that I'm overlooking that would be the equivalent of STREAM_CLIENT_PERSISTENT?


I was already about to answer that libcurl already does that all for us, realizing that we destroy the used CURL handles at the end of each PHP request at the latest, thus killing any alive connections. This happened about two weeks ago, and pecl/http 1.5, of which RC1 had just been released, will support per process persistent CURL handles. It can be enabled at compile time only, as it's a quite intrusive feature. Yet I'm still unsure about the implementation of this feature and it might change in the future to become a bit more user-friendly.


To use it, there's nothing else to be done than tossing --enable-http-persistent-handles at configure.

1 comment:

  1. A parting line is the road of separation on the part where the two halves Kids Caps of the mould meet. The line actually signifies the parting "plane" that passes by way of the part. While on simple components this plane often a|could be a} simple, flat floor, it is usually a fancy kind that traces the perimeter of the part around the varied options that make up the part’s outer silhouette. Keep in mind when designing your part, that the melt will all the time flow towards of|in direction of} the parting line because of|as a end result of} it's the best place for the displaced air to flee or vent. During the cooling course of, if partitions are an inconsistent thickness, the thinner partitions will cool first while the thick partitions are nonetheless solidifying.

    ReplyDelete