mirror of
https://github.com/curl/curl.git
synced 2026-08-01 21:20:28 +03:00
parent
56e40ae6a5
commit
8ad0243e1f
4 changed files with 66 additions and 1 deletions
|
|
@ -26,6 +26,10 @@ Example subscribe:
|
|||
This sends an MQTT SUBSCRIBE packet for the topic `bedroom/temp` and listen in
|
||||
for incoming PUBLISH packets.
|
||||
|
||||
You can set the upkeep interval ms option to make curl send MQTT ping requests to the
|
||||
server at an internal, to prevent the connection to get closed because of idleness.
|
||||
You might then need to use the progress callback to cancel the operation.
|
||||
|
||||
### Publishing
|
||||
|
||||
Command usage:
|
||||
|
|
|
|||
|
|
@ -31,10 +31,13 @@ send some traffic on existing connections in order to keep them alive; this
|
|||
can prevent connections from being closed due to overzealous firewalls, for
|
||||
example.
|
||||
|
||||
Currently the only protocol with a connection upkeep mechanism is HTTP/2: when
|
||||
For HTTP/2 we have an upkeep mechanism: when
|
||||
the connection upkeep interval is exceeded and curl_easy_upkeep(3)
|
||||
is called, an HTTP/2 PING frame is sent on the connection.
|
||||
|
||||
For MQTT the upkeep interval defines when to send ping requests to prevent the
|
||||
server from disconnecting.
|
||||
|
||||
This function must be explicitly called in order to perform the upkeep work.
|
||||
The connection upkeep interval is set with
|
||||
CURLOPT_UPKEEP_INTERVAL_MS(3).
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue