2
0

README.pipelining 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. HTTP Pipelining with libcurl
  2. ============================
  3. Background
  4. Since pipelining implies that one or more requests are sent to a server before
  5. the previous response(s) have been received, we only support it for multi
  6. interface use.
  7. Considerations
  8. When using the multi interface, you create one easy handle for each transfer.
  9. Bascially any number of handles can be created, added and used with the multi
  10. interface - simultaneously. It is an interface designed to allow many
  11. simultaneous transfers while still using a single thread. Pipelining does not
  12. change any of these details.
  13. API
  14. We've added a new option to curl_multi_setopt() called CURLMOPT_PIPELINING
  15. that enables "attempted pipelining" and then all easy handles used on that
  16. handle will attempt to use an existing pipeline.
  17. Details
  18. - A pipeline is only created if a previous connection exists to the same IP
  19. address that the new request is being made to use.
  20. - Pipelines are only supported for HTTP(S) as no other currently supported
  21. protocol has features resemembling this, but we still name this feature
  22. plain 'pipelining' to possibly one day support it for other protocols as
  23. well.
  24. - HTTP Pipelining is for GET and HEAD requests only.
  25. - When a pipeline is in use, we must take precautions so that when used easy
  26. handles (i.e those who still wait for a response) are removed from the multi
  27. handle, we must deal with the outstanding response nicely.
  28. - Explicitly asking for pipelining handle X and handle Y won't be supported.
  29. It isn't easy for an app to do this association. The lib should probably
  30. still resolve the second one properly to make sure that they actually _can_
  31. be considered for pipelining. Also, asking for explicit pipelining on handle
  32. X may be tricky when handle X get a closed connection.