merge issue#25

This commit is contained in:
Feng Lee 2014-12-28 21:29:58 +08:00
commit ec96c155bb
3 changed files with 20 additions and 0 deletions

View File

@ -2,6 +2,8 @@
eMQTT is a scalable, fault-tolerant and extensible mqtt broker written in Erlang/OTP. eMQTT is a scalable, fault-tolerant and extensible mqtt broker written in Erlang/OTP.
eMQTT support MQTT V3.1 Protocol Specification.
eMQTT requires Erlang R17+. eMQTT requires Erlang R17+.
## Startup in Five Minutes ## Startup in Five Minutes

View File

@ -18,6 +18,8 @@
%% Copyright (c) 2007-2012 VMware, Inc. All rights reserved. %% Copyright (c) 2007-2012 VMware, Inc. All rights reserved.
%% %%
-define(CLIENT_ID_MAXLEN, 1024).
-define(PROTOCOL_NAMES, [{3, <<"MQIsdp">>}, {4, <<"MQTT">>}]). -define(PROTOCOL_NAMES, [{3, <<"MQIsdp">>}, {4, <<"MQTT">>}]).
-define(MQTT_PROTO_MAJOR, 3). -define(MQTT_PROTO_MAJOR, 3).

View File

@ -43,6 +43,22 @@
-include("emqtt_frame.hrl"). -include("emqtt_frame.hrl").
-record(state, {socket,
conn_name,
await_recv,
connection_state,
conserve,
parse_state,
message_id,
client_id,
clean_sess,
will_msg,
keep_alive,
awaiting_ack,
subtopics,
awaiting_rel}).
-define(FRAME_TYPE(Frame, Type), -define(FRAME_TYPE(Frame, Type),
Frame = #mqtt_frame{ fixed = #mqtt_frame_fixed{ type = Type }}). Frame = #mqtt_frame{ fixed = #mqtt_frame_fixed{ type = Type }}).