class MQTT::V3::Client
- MQTT::V3::Client
- Reference
- Object
Overview
https://test.mosquitto.org/
Defined in:
mqtt/v3/client.crConstructors
Class Method Summary
-
.topic_matches(filter : String, topic : String)
Based on https://github.com/ralphtheninja/mqtt-match/blob/master/index.js
Instance Method Summary
- #closed?
- #connect(username : String | Nil = nil, password : String | Nil = nil, keep_alive : Int32 = 60, client_id : String = MQTT.generate_client_id, clean_start : Bool = true, will_flag : Bool = false, will_qos : Int32 | QoS = 0, will_retain : Bool = false, will_topic : String | Nil = nil, will_payload : String | Nil = nil)
- #disconnect(send_msg = true) : Nil
- #last_ping_response : Time | Nil
- #parse_message(io)
- #ping : Nil
- #publish(topic : String, payload = "", retain : Bool = false, qos : QoS = QoS::FireAndForget)
- #publish_received(pub)
-
#subscribe(topics : Hash(String, Tuple(QoS, Proc(String, Bytes, Nil))))
http://www.steves-internet-guide.com/understanding-mqtt-topics/
- #subscribe(*topics, qos : QoS = QoS::FireAndForget, &callback : Proc(String, Bytes, Nil))
- #unsubscribe(topic : String, callback : Proc(String, Bytes, Nil))
- #unsubscribe(*topics)
-
#wait_close : Nil
Returns once the MQTT connection has terminated
Constructor Detail
Class Method Detail
def self.topic_matches(filter : String, topic : String)
#
Based on https://github.com/ralphtheninja/mqtt-match/blob/master/index.js
Instance Method Detail
def connect(username : String | Nil = nil, password : String | Nil = nil, keep_alive : Int32 = 60, client_id : String = MQTT.generate_client_id, clean_start : Bool = true, will_flag : Bool = false, will_qos : Int32 | QoS = 0, will_retain : Bool = false, will_topic : String | Nil = nil, will_payload : String | Nil = nil)
#
http://www.steves-internet-guide.com/understanding-mqtt-topics/