class

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)
Source

Instance methods

close
Source
disconnect
Source
on_message
Source
ping
Source
publish(topic : String, body, qos : Int = 0_u8, retain = false)
Source
publish(*messages : Message)
Source
subscribe(topic : String, qos : Int = 0_u8)
Source
subscribe(*topics : Tuple(String, Int))
Source
unsubscribe(*topics : String)
Source

Nested types