I developed a program that makes parameters tracking. I want to inform a server with a http message over udp when a parameter value changes.
I want to use libcurl for that. Does libcurl able to send a http message over UDP?
I developed a program that makes parameters tracking. I want to inform a server with a http message over udp when a parameter value changes.
I want to use libcurl for that. Does libcurl able to send a http message over UDP?
No it doesn't. For HTTP, libcurl only supports TCP or Unix domain socket. It could possibly be something to add in a future.
(libcurl supports UDP transfers for a few other protocols.)
HTTP/3 is done over QUIC which is done over UDP, so strictly speaking if you use curl to do a HTTP/3 transfer it will use UDP. But I'm just guessing that is not what this question is about...
HTTP could in theory be used over a different protocol than TCP (this case is mentioned in RFC2616), but it needs to be a reliable protocol, that is a protocol which provides guaranteed delivery, must keep the order of messages and must detect duplicates. Plain UDP does not provide these things and thus it is not possible to use HTTP over plain UDP and thus libcurl does not provide it.
If you are interested in a protocol with a syntax close to HTTP, but with support of UDP, then have a look at SIP which is used for VoIP.