cURL / Mailing Lists / curl-library / Single Mail

curl-library

Removing internal dual interface code handling

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 26 Nov 2012 22:40:38 +0100 (CET)

Hi friends,

Just a heads up about some of my current tinkering!

A very long time ago (commit 91f483c5) it struck me we should make sure that
we stop handling easy and multi interface differently internally. This, since
the current way makes things error prone and more complicated than having a
single code path. This fact has numerous times turned out to be a source for
bugs, grief and problems.

In order to accomplish this and still support the exact same API and ABI, I
want curl_easy_perform() to basically be a function that uses the multi
interface with only a single easy handle.

Time passed and now I'm about to actually try to make reality of this old
idea. I'm attaching a first very rough patch that shows what I mean. It runs a
lot of test cases fine but there's well over a dozen that breaks so I don't
consider this near a merge yet.

As you will see, the new curl_easy_perform() implementation is almost
ridiculously simple - even though I'm sure I've missed a couple of things we
need to add before we can consider it a true replacement.

I'm aware of some extensive pending patches coming up for the multi interface
for pipelining and more, so I will make sure to not rock the boat too much
before that happens. I will instead continue working and make all test cases
work with my new approach.

-- 
  / daniel.haxx.se


-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html

Received on 2012-11-26