From 669a717bb26f6d9877ba3274a705a2cee05d930c Mon Sep 17 00:00:00 2001 From: Feng Date: Sun, 5 Jul 2015 20:16:23 +0800 Subject: [PATCH] pktid --- include/emqttd.hrl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/emqttd.hrl b/include/emqttd.hrl index 3540fbcda..2ea71811c 100644 --- a/include/emqttd.hrl +++ b/include/emqttd.hrl @@ -107,10 +107,12 @@ %%------------------------------------------------------------------------------ %% MQTT Message %%------------------------------------------------------------------------------ --type mqtt_msgid() :: binary(). +-type mqtt_msgid() :: binary() | undefined. +-type mqtt_pktid() :: 1..16#ffff | undefined. -record(mqtt_message, { msgid :: mqtt_msgid(), %% Unique Message ID + pktid :: 1..16#ffff, %% PacketId topic :: binary(), %% Topic that the message is published to from :: binary() | atom(), %% ClientId of publisher qos = 0 :: 0 | 1 | 2, %% Message QoS @@ -118,7 +120,7 @@ dup = false :: boolean(), %% Dup flag sys = false :: boolean(), %% $SYS flag payload :: binary(), %% Payload - timestamp :: erlang:timestamp() %% Timestamp + timestamp :: erlang:timestamp() %% os:timestamp }). -type mqtt_message() :: #mqtt_message{}.