Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
conn vs data cleanup #3442
Easy handles and connections
A common pattern in the libcurl code is having connections (struct
We therefore pass around the 'conn' pointer only in a lot of places as we can
This made perfect sense back in the days when each transfer had a single
Now, several simultaneous transfers can use the same connection so conn->data
Two transfers using two connections
Two transfers using one connection
A better way
A transfer however only uses a single connection for a transfer (or none at
Use of 'conn->data' should be removed over time in preference to 'data->conn'.
Gradual, not single-shot
I previously made an attempt in making this change (basically removing
That experience made me draw the conclusion that we need to make this change
Over time, data->conn should be used and conn->data use should be reduced.
Probably, yes. But I still think doing it gradually instead of a huge single merge will make a softer landing.
Clearly some more fixes are needed to make the builds green...