Search code examples
c++ccurludplibcurl

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?


Solution

  • 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

    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...