class MQTT::Client
- MQTT::Client
- Reference
- Object
Defined in:
mqtt-client.crmqtt-client/connection.cr
mqtt-client/message.cr
Constructors
Instance Method Summary
- #close
- #disconnect
- #on_message(&blk : ReceivedMessage -> Nil)
- #ping
- #publish(topic : String, body, qos : Int = 0_u8, retain = false)
- #publish(*messages : Message)
- #subscribe(topic : String, qos : Int = 0_u8)
- #subscribe(*topics : Tuple(String, Int))
- #unsubscribe(*topics : String)
Constructor Detail
def self.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)
#