cURL / Mailing Lists / curl-library / Single Mail


Re: Fwd: CUL and TCP protocol

From: Elliť Computing Open Source Program <>
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.


List admin:
Received on 2012-10-11