curl / Mailing Lists / curl-library / Single Mail

curl-library

cURL and custom protocols

From: Michael Jungnickl via curl-library <curl-library_at_cool.haxx.se>
Date: Fri, 25 Jan 2019 16:30:28 +0100

Hello,

we like to use cURL because it's implemented for a lot of operating
systems.

But now I have a problem:
Zotero uses a simple data format. It's called "LibreOffice Plugin Wire
Protocol".
The application send/reads raw data directly to the Zotero application
as server using http://127.0.0.1:23116.

Link:
https://www.zotero.org/support/dev/client_coding/libreoffice_plugin_wire_protocol

Does the cURL library support the development of such new protocols?
Means can I use cURL in this case?

I try to initialize cURL as follows:

curl = curl_easy_init();
  if (curl)
  {
         res = curl_easy_setopt(curl, CURLOPT_URL, "http://127.0.0.1");
         res = curl_easy_setopt(curl, CURLOPT_LOCALPORT,    23116);

         // No other initialization, since it's raw data.

         // Some testings, which are wrong I think.
//        res = curl_easy_setopt(curl, CURLOPT_PROTOCOLS, CURLPROTO_HTTP);
//        res = curl_easy_setopt(curl, CURLOPT_CONNECT_ONLY,     1);

         // Error CURLE_UNSUPPORTED_PROTOCOL twice.
         res = curl_easy_send(curl, lpBodyA, nBodyA, &lenSend);
         res = curl_easy_recv(curl, recData, sizeof(recData), &lenRec);

         curl_easy_cleanup(curl);
}

Thanks you in advance for your reply,

Michael Jungnickl

-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2019-01-25