diff --git a/include/emqx_mqtt.hrl b/include/emqx_mqtt.hrl index 655b8e755..52b5d4313 100644 --- a/include/emqx_mqtt.hrl +++ b/include/emqx_mqtt.hrl @@ -351,6 +351,13 @@ variable = #mqtt_packet_publish{packet_id = PacketId} }). +-define(PUBLISH_PACKET(QoS, Topic, PacketId), + #mqtt_packet{header = #mqtt_packet_header{type = ?PUBLISH, + qos = QoS}, + variable = #mqtt_packet_publish{topic_name = Topic, + packet_id = PacketId} + }). + -define(PUBLISH_PACKET(QoS, Topic, PacketId, Payload), #mqtt_packet{header = #mqtt_packet_header{type = ?PUBLISH, qos = QoS}, diff --git a/src/emqx_channel.erl b/src/emqx_connection.erl similarity index 100% rename from src/emqx_channel.erl rename to src/emqx_connection.erl diff --git a/src/emqx_ws_channel.erl b/src/emqx_ws_connection.erl similarity index 100% rename from src/emqx_ws_channel.erl rename to src/emqx_ws_connection.erl