cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Fwd: CUL and TCP protocol

From: Ellié Computing Open Source Program <opensource_at_elliecomputing.com>
Date: Thu, 11 Oct 2012 09:08:36 +0200

>Hi, ALL,
>I currently need to communicate with the device which is connected to
>the web.
>I have a protocol documentation and I know the device IP.
>
>The problem is that it looks like CURL is making a requests on well
>known protocols (HTTP(S), FTP, UDP, etc.).
>
>Is there a way to write a function that will use my own protocol
>specification or I have to write a TCP client?
I believe there is an option for "simple connection" (CURLOPT_CONNECT_ONLY),
it seems to be designed for HTTP-like connections (you'll probably have to
fake the connection url with something like: http://ip:myport/).
You then use curl_easy_getinfo(handle, CURLINFO_LASTSOCKET) to retrieve the
socket and communicate in place of cURL.

Regards
Armel

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-10-11