Buy commercial curl support from WolfSSL. We help you work
out your issues, debug your libcurl applications, use the API, port to new
platforms, add new features and more. With a team lead by the curl founder
himself.
conn.data considered bad
- Contemporary messages sorted: [ by date ] [ by thread ] [ by subject ] [ by author ] [ by messages with attachments ]
From: Daniel Stenberg via curl-library <curl-library_at_cool.haxx.se>
Date: Fri, 8 Jan 2021 15:51:45 +0100 (CET)
Hi all,
Here's something that's been itching in me for a long time. Something I've
even (twice!) tried to fix. Both times my patch ended up so huge and
complicated for me that I had to give it and postpone the idea.
Put shortly: "conn->data considered bad". The association *from* a connection
object to a transfer object is bad, because it is fragile and error-prone due
to the fact that it can and will change very frequently for multiplexed
transfers.
A transfer can use one (or no) connection. A connection can have no, one or
very many transfers associated with it.
Conclusion: we should stop using 'conn->data' in libcurl
Status: there are 939 current uses of this pointer
Mission: reduce the use of this pointer, aiming to reach a point in the future
when we can remove it from the connection struct.
All this summed up in a wiki page:
https://github.com/curl/curl/wiki/conn.data-considered-bad
Date: Fri, 8 Jan 2021 15:51:45 +0100 (CET)
Hi all,
Here's something that's been itching in me for a long time. Something I've
even (twice!) tried to fix. Both times my patch ended up so huge and
complicated for me that I had to give it and postpone the idea.
Put shortly: "conn->data considered bad". The association *from* a connection
object to a transfer object is bad, because it is fragile and error-prone due
to the fact that it can and will change very frequently for multiplexed
transfers.
A transfer can use one (or no) connection. A connection can have no, one or
very many transfers associated with it.
Conclusion: we should stop using 'conn->data' in libcurl
Status: there are 939 current uses of this pointer
Mission: reduce the use of this pointer, aiming to reach a point in the future
when we can remove it from the connection struct.
All this summed up in a wiki page:
https://github.com/curl/curl/wiki/conn.data-considered-bad
-- / daniel.haxx.se | Commercial curl support up to 24x7 is available! | Private help, bug fixes, support, ports, new features | https://www.wolfssl.com/contact/ ------------------------------------------------------------------- Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library Etiquette: https://curl.se/mail/etiquette.htmlReceived on 2021-01-08