MQTT::Client
Inherits Reference / Object
Constructors
new(host : String, port : Int32 = 1883, tls : Bool = false, client_id : String = "", clean_session : Bool = true, user : String | Nil = nil, password : String | Nil = nil, will : Message | Nil = nil, keepalive : Int = 60_u16, autoack : Bool = true, sock_opts : MQTT::Client::SocketOptions = SocketOptions.new)
SourceInstance methods
close
Sourcedisconnect
Sourceon_message
Sourceping
Sourcepublish(topic : String, body, qos : Int = 0_u8, retain = false)
Sourcepublish(*messages : Message)
Sourcesubscribe(topic : String, qos : Int = 0_u8)
Sourcesubscribe(*topics : Tuple(String, Int))
Sourceunsubscribe(*topics : String)
Source