module MQTT
Defined in:
mqtt/base.crmqtt/client.cr
mqtt/client_base.cr
mqtt/header.cr
mqtt/pending.cr
mqtt/reconnect.cr
mqtt/topic.cr
mqtt/transport.cr
mqtt/transport/tcp.cr
mqtt/transport/websocket.cr
mqtt/v3/ack.cr
mqtt/v3/client.cr
mqtt/v3/connack.cr
mqtt/v3/connect.cr
mqtt/v3/empty_packet.cr
mqtt/v3/header.cr
mqtt/v3/publish.cr
mqtt/v3/suback.cr
mqtt/v3/subscribe.cr
mqtt/v3/unsubscribe.cr
mqtt/v5/ack.cr
mqtt/v5/client.cr
mqtt/v5/connect.cr
mqtt/v5/property.cr
mqtt/v5/publish.cr
mqtt/v5/reason_code.cr
mqtt/v5/subscribe.cr
mqtt/variable_byte_integer.cr
Constant Summary
-
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_LENGTHsized 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 Method Summary
- .generate_client_id(prefix = "crystal")
- .monotonic : Monotonic
- .peek_type(io : IO)
-
.topic_matches?(filter : String, topic : String) : Bool
Does a topic name match a subscription filter?
Macro Summary
Class Method Detail
def self.topic_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