[454852] Support setting keepalive on pub client.

Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=454852
pull/211/merge
Roger A. Light 11 years ago
parent e5a251f0bb
commit c12d3ebc0b

@ -53,6 +53,7 @@ Clients:
- Both clients can now load default configuration options from a file.
- Add -1 (oneshot) option to mosquitto_sub.
- Add --proxy SOCKS5 support for both clients.
- Pub client supports setting its keepalive. Closes bug #454852.
Client library:
- Add experimental SOCKS5 support.

@ -200,7 +200,7 @@ void print_usage(void)
mosquitto_lib_version(&major, &minor, &revision);
printf("mosquitto_pub is a simple mqtt client that will publish a message on a single topic and exit.\n");
printf("mosquitto_pub version %s running on libmosquitto %d.%d.%d.\n\n", VERSION, major, minor, revision);
printf("Usage: mosquitto_pub [-h host] [-p port] [-q qos] [-r] {-f file | -l | -n | -m message} -t topic\n");
printf("Usage: mosquitto_pub [-h host] [-k keepalive] [-p port] [-q qos] [-r] {-f file | -l | -n | -m message} -t topic\n");
#ifdef WITH_SRV
printf(" [-A bind_address] [-S]\n");
#else
@ -230,6 +230,7 @@ void print_usage(void)
printf(" -i : id to use for this client. Defaults to mosquitto_pub_ appended with the process id.\n");
printf(" -I : define the client id as id_prefix appended with the process id. Useful for when the\n");
printf(" broker is using the clientid_prefixes option.\n");
printf(" -k : keep alive in seconds for this client. Defaults to 60.\n");
printf(" -l : read messages from stdin, sending a separate message for each line.\n");
printf(" -m : message payload to send.\n");
printf(" -M : the maximum inflight messages for QoS 1/2..\n");

@ -22,6 +22,7 @@
<arg><option>-h</option> <replaceable>hostname</replaceable></arg>
<arg><option>-i</option> <replaceable>client_id</replaceable></arg>
<arg><option>-I</option> <replaceable>client id prefix</replaceable></arg>
<arg><option>-k</option> <replaceable>keepalive time</replaceable></arg>
<arg><option>-p</option> <replaceable>port number</replaceable></arg>
<arg><option>-q</option> <replaceable>message QoS</replaceable></arg>
<arg><option>--quiet</option></arg>
@ -207,6 +208,15 @@
point using encryption.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-k</option></term>
<term><option>--keepalive</option></term>
<listitem>
<para>The number of seconds between sending PING commands
to the broker for the purposes of informing it we are still
connected and functioning. Defaults to 60 seconds.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--key</option></term>
<listitem>

Loading…
Cancel
Save