Module util

Module util 

Source
Expand description

§Protocol Utilities

Contains utility functions for MQTT protocol handling including:

  • Topic validation and filtering
  • Variable byte integer encoding
  • System topic detection

§MQTT Protocol Utilities

This module provides utility functions for MQTT protocol handling, including:

  • Variable byte integer length calculation
  • Topic name and filter validation
  • System topic detection

These utilities are used throughout the codec for validating MQTT-specific data structures and ensuring protocol compliance.

Functions§

is_system_topic
Determines if a topic name represents a system topic.
is_valid_topic_filter
Validates whether a string is a valid MQTT topic filter.
is_valid_topic_name
Validates whether a string is a valid MQTT topic name.
len_bytes
Calculates the number of bytes required to encode a length value using MQTT’s variable byte integer encoding format.