Can libcurl send HTTP message over UDP?

I have developed a program that tracks parameters. I want to tell the server with a http message via udp when the parameter value changes.

I want to use libcurl for this. Can libcurl send HTTP message over UDP?

+3


source to share


2 answers


No no. For HTTP, libcurl only supports TCP port or Unix domain. Perhaps it could be something to add in the future.



(libcurl supports UDP transmission for several other protocols.)

+3


source


HTTP can theoretically be used over a different protocol than TCP (this case is mentioned in RFC2616), but it must be a reliable protocol, which is a protocol that ensures guaranteed delivery, must maintain message order, and must detect duplicates. Normal UDP does not provide these things, and therefore it is not possible to use HTTP over plain UDP and hence libcurl does not provide it.



If you are interested in a protocol with a syntax similar to HTTP but with UDP support, look at SIP, which is used for VoIP.

+2


source







All Articles