MQTT
Constants
DEFAULT_MAX_PACKET_SIZE = (8_u32 * 1024) * 1024
Default limit on the size of a single packet we're willing to buffer from a
remote host. Without a limit a hostile or faulty broker can advertise a
MAX_REMAINING_LENGTH sized packet and force us to buffer 256MB of data.
DEFAULT_PORT = 1883
Default port number for unencrypted connections
DEFAULT_SSL_PORT = 8883
Default port number for TLS/SSL encrypted connections
Log = ::Log.for(self)
MAX_REMAINING_LENGTH = 268435455_u32
The largest remaining-length the 4 byte variable length header can encode
Class methods
generate_client_id(prefix = "crystal")
Sourcemonotonic
Sourcepeek_type(io : IO)
Sourcetopic_matches?(filter : String, topic : String) : Bool
Does a topic name match a subscription filter?
The wildcard rules are unchanged between 3.1.1 and 5.0, so both clients share this. Based on https://github.com/ralphtheninja/mqtt-match
Macros
string(name, onlyif = nil, default = nil, &block)
SourceNested types
- MQTT::Client
- MQTT::ClientBase
- MQTT::ConnectError
- MQTT::Error
- MQTT::Header
- MQTT::Monotonic
- MQTT::NotConnectedError
- MQTT::PacketError
- MQTT::Pending(T)
- MQTT::ProtocolError
- MQTT::QoS
- MQTT::Reconnect
- MQTT::RequestType
- MQTT::SubscriptionError
- MQTT::TimeoutError
- MQTT::Transport
- MQTT::V3
- MQTT::V5
- MQTT::VariableByteInteger
- MQTT::Version