# `MqttX.Packet.Types`
[🔗](https://github.com/cignosystems/mqttx/blob/v0.10.0/lib/mqttx/packet/types.ex#L1)

MQTT packet type constants, reason codes, and property identifiers.

Supports MQTT 3.1, 3.1.1, and 5.0 protocols.

# `atom_to_type`

```elixir
@spec atom_to_type(atom()) :: integer()
```

Convert packet type atom to code.

# `auth`

# `connack`

# `connect`

# `disconnect`

# `max_packet_size`

# `max_varint`

# `mqtt_v3`

# `mqtt_v5`

# `mqtt_v311`

# `pingreq`

# `pingresp`

# `prop_assigned_client_identifier`

# `prop_authentication_data`

# `prop_authentication_method`

# `prop_content_type`

# `prop_correlation_data`

# `prop_maximum_packet_size`

# `prop_maximum_qos`

# `prop_message_expiry_interval`

# `prop_payload_format_indicator`

# `prop_reason_string`

# `prop_receive_maximum`

# `prop_request_problem_information`

# `prop_request_response_information`

# `prop_response_information`

# `prop_response_topic`

# `prop_retain_available`

# `prop_server_keep_alive`

# `prop_server_reference`

# `prop_session_expiry_interval`

# `prop_shared_subscription_available`

# `prop_subscription_identifier`

# `prop_subscription_identifier_available`

# `prop_topic_alias`

# `prop_topic_alias_maximum`

# `prop_user_property`

# `prop_wildcard_subscription_available`

# `prop_will_delay_interval`

# `protocol_name`

# `protocol_name_3`

# `protocol_name_for_version`

```elixir
@spec protocol_name_for_version(integer()) :: binary()
```

Get protocol name for version.

# `puback`

# `pubcomp`

# `publish`

# `pubrec`

# `pubrel`

# `rc_bad_username_password`

# `rc_client_id_not_valid`

# `rc_not_authorized`

# `rc_success`

# `rc_unsupported_protocol`

# `reason_code`

Get reason code by name.

# `reason_codes`

Get all MQTT 5.0 reason codes as a map.

# `suback`

# `subscribe`

# `type_to_atom`

```elixir
@spec type_to_atom(integer()) :: atom()
```

Convert packet type code to atom.

# `unsuback`

# `unsubscribe`

# `valid_version?`

```elixir
@spec valid_version?(integer()) :: boolean()
```

Check if protocol version is valid.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
