bagder/curl — pull request #86 by fredericgermain (2014-01-23 10:08:43+00:00)
Title: Curl_getconnectinfo: works on detached easy connection from a multi hand...

...le

it can be used to implement websocket with curl and a custom websocket
parser:
1) add a easy handle wich represent your UPGRADE http request,
with CURLOPT_HEADERFUNCTION set
2) on the last last header, do the following to detach the connection
curl_easy_pause(easy_handle, CURLPAUSE_ALL);
curl_easy_setopt(easy_handle, CURLOPT_FORBID_REUSE, 1);
curl_easy_setopt(easy_handle, CURLOPT_CONNECT_ONLY, 1);
3) using the multi port you have, you can safely poll your socket
for data, and use curl_easy_send/curl_easy_recv to exchange
data with the connection