PAHO_C_SUB(1L)
π¦ PAHO_C_SUB β the paho_c_sub(1L) page, bestie edition π¦
okay so. welcome to the manual for paho_c_sub, from the Paho C crew. pull up a chair, grab a strawberry π, and let's get you subscribed.
β¨ NAME β¨
paho_c_sub β receive (subscribe to) data from an MQTT server π
π SYNOPSIS π
paho_c_sub [topic] [-t|--topic topic] [-c|--connection connection]
[-h|--host hostname] [-p|--port portnumber] [-i|--clientid clientid]
[-u|--username username] [-P|--password password] [-k|--keepalive
keepalive-timeout] [-V|--MQTT-version 31|311|5]
[-q|--qos 0|1|2] [-R|--no-retained] [--delimiter delimiter] [--no-
delimiter]
[--quiet] [--verbose] [--trace min|max|error|protocol]
[--will-topic will-topic] [--will-payload will-payload] [--will-retain]
[--will-qos 0|1|2]
[--cafile cafile] [--capath capath] [--cert certfile] [--key keyfile]
[--keypass password] [--ciphers cipher-string] [--insecure]
no cap, that's the whole vibe right there π
π DESCRIPTION π
paho_c_sub receives data from an MQTT server using the Eclipse Paho C client asynchronous library (MQTTAsync). MQTT is a protocol, operating over TCP/IP, which allows programs to easily communicate with each other through a server. Messages are published to topics and delivered to any subscribers to those topics. The corresponding publisher program paho_c_pub allows MQTT messages to be sent. it's giving pen pals but for processes π
The default mode of operation is to output each message to stdout terminated by the delimiter. simple. iconic. periodt β¨
π OPTIONS π
so many flags bestie, but every single one is here, i promise π«Ά
-t,--topicβ The MQTT topic to publish the data to.-c,--connectionβ The MQTT URI to connect to, a combination of transport prefix, host, port and for websockets, topic. To connect using TCP use thetcpprefix, for example:tcp://localhost:1883. An example using SSL/TLS:ssl://localhost:1883. An example for websockets, insecure:ws://localhost:1883/topic, and secure:wss://localhost:80/topic.-h,--hostβ The TCP/IP host name of the MQTT server to connect to. Along with the--portoption, an older alternative to using--connection.-p,--portβ The TCP/IP port number of the MQTT server to connect to. Along with the--hostoption, an older alternative to using--connection.-q,--qosβ The MQTT QoS on which to publish the message. The alternatives are0,1or2.-V,--MQTTversionβ The version of the MQTT protocol to use. Valid options are31(ormqttv31),311(mqttv311) and5(ormqttv5).--quietβ Do not print error messages.--traceβ Print library internal trace. Valid levels aremin,max,errorandprotocol.-R,--no-retainedβ Do not print messages which have the MQTT retained flag set.--delimiterβ The delimiter string to append to each message when printing. Defaults to newline.--no-delimiterβ Do not add a delimiter to each message when printing.--will-topicβ Sets the MQTT will message topic to publish to. If the application ends without sending an MQTT disconnect, the will message will be published to this topic.--will-payloadβ Only used ifwill-topicis set. Sets the MQTT will message to be published.--will-qosβ Only used ifwill-topicis set. Sets the MQTT QoS at which the will message is published. The alternatives are0,1or2.--will-retainβ Only used ifwill-topicis set. Sets the MQTT retained flag on the will message.--cafileβ Only used with a TLS connection. The name of a file for the OpenSSL trust store.--capathβ Only used with a TLS connection. The name of a directory holding OpenSSL trusted certificates.--certβ Only used with a TLS connection. The name of a file for the TLS keystore containing a client certificate to be presented.--keyβ Only used with a TLS connection. The name of a file containing the client private key.--keypassβ Only used with a TLS connection. The password for the client private key file, if needed.--ciphersβ Only used with a TLS connection. A list of cipher suites that the client will present to the server during the TLS handshake.--insecureβ Only used with a TLS connection. Don't check that the server certificate common name matches the hostname.
π bestie please read the --insecure one twice. it literally turns off the check that the server cert common name matches the hostname. it's a vibe, but it's a risky vibe. you've been warned π¨
and that's the whole page, no skips, no cuts π
this lil masterpiece came from http://eclipse.org/paho, dated 31 July 2018, and it's the v1.3.0 era of PAHO_C_SUB(1L). go subscribe to something cute, bestie π§β¨
π¦ where this page comes from
- debian trixie: paho.mqtt.c-examples 1.3.14-2 Β· EPL-2.0
- ubuntu noble: paho.mqtt.c-examples 1.3.13-1build2 Β· EPL-2.0
- ubuntu questing: paho.mqtt.c-examples 1.3.14-2
- ubuntu resolute: paho.mqtt.c-examples 1.3.15-1 Β· EPL-2.0
- ubuntu stonking: paho.mqtt.c-examples 1.3.16+ds-1build1 Β· EPL-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms