Easy handles and connections
When reading the source code there are some useful basics that are good toknow and keep in mind:
'data' is the variable name we use all over to refer to the easy handle(
struct Curl_easy
) for the transfer being worked on. No other name shouldbe used for this and nothing else should use this name. The easy handle isthe main object identifying a transfer. A transfer typically uses aconnection at some point and typically only one at a time. There is adata->conn
pointer that identifies the connection that is currently usedby this transfer. A single connection can be used over time and evenconcurrently by several transfers (and thus easy handles) when multiplexedconnections are used.conn
is the variable name we use all over the internals to refer to thecurrentconnection the code works on (struct connectdata
).result
is the usual name we use for aCURLcode
variable to hold thereturn values from functions and if that return value is different thanzero, it is an error and the function should clean up and return (usuallypassing on the same error code to its parent function).