This commit is contained in:
Ery Lee 2014-12-10 14:20:00 +08:00
parent 23163edab7
commit a0017c3186
22 changed files with 49 additions and 26 deletions

1
.gitignore vendored
View File

@ -10,3 +10,4 @@ rel/emqtt
.concrete/DEV_MODE
.rebar
test/ebin/*.beam
.exrc

View File

@ -1,5 +1,5 @@
%%------------------------------------------------------------------------------
%% Copyright (c) 2014, Feng Lee <feng.lee@slimchat.io>
%% Copyright (c) 2014, Feng Lee <feng@slimchat.io>
%%
%% Permission is hereby granted, free of charge, to any person obtaining a copy
%% of this software and associated documentation files (the "Software"), to deal
@ -23,7 +23,7 @@
%% ---------------------------------
%% banner
%% ---------------------------------
-define(COPYRIGHT, "Copyright (C) 2014, Feng Lee<feng.lee@slimchat.io>").
-define(COPYRIGHT, "Copyright (C) 2014, Feng Lee<feng@slimchat.io>").
-define(LICENSE_MESSAGE, "Licensed under MIT").

View File

@ -1,5 +1,5 @@
%%-----------------------------------------------------------------------------
%% Copyright (c) 2014, Feng Lee <feng.lee@slimchat.io>
%% Copyright (c) 2014, Feng Lee <feng@slimchat.io>
%%
%% Permission is hereby granted, free of charge, to any person obtaining a copy
%% of this software and associated documentation files (the "Software"), to deal

View File

@ -1,5 +1,5 @@
%%-----------------------------------------------------------------------------
%% Copyright (c) 2014, Feng Lee <feng.lee@slimchat.io>
%% Copyright (c) 2014, Feng Lee <feng@slimchat.io>
%%
%% Permission is hereby granted, free of charge, to any person obtaining a copy
%% of this software and associated documentation files (the "Software"), to deal

View File

@ -1,5 +1,5 @@
%%-----------------------------------------------------------------------------
%% Copyright (c) 2014, Feng Lee <feng.lee@slimchat.io>
%% Copyright (c) 2014, Feng Lee <feng@slimchat.io>
%%
%% Permission is hereby granted, free of charge, to any person obtaining a copy
%% of this software and associated documentation files (the "Software"), to deal

View File

@ -1,5 +1,5 @@
%%-----------------------------------------------------------------------------
%% Copyright (c) 2014, Feng Lee <feng.lee@slimchat.io>
%% Copyright (c) 2014, Feng Lee <feng@slimchat.io>
%%
%% Permission is hereby granted, free of charge, to any person obtaining a copy
%% of this software and associated documentation files (the "Software"), to deal
@ -22,7 +22,7 @@
-module(emqtt_app).
-author('ery.lee@gmail.com').
-author('feng@slimchat.io').
-include("emqtt_log.hrl").

View File

@ -1,5 +1,5 @@
%%-----------------------------------------------------------------------------
%% Copyright (c) 2014, Feng Lee <feng.lee@slimchat.io>
%% Copyright (c) 2014, Feng Lee <feng@slimchat.io>
%%
%% Permission is hereby granted, free of charge, to any person obtaining a copy
%% of this software and associated documentation files (the "Software"), to deal
@ -22,7 +22,7 @@
-module(emqtt_auth).
-author('feng.lee@slimchat.io').
-author('feng@slimchat.io').
-include("emqtt.hrl").

View File

@ -1,5 +1,5 @@
%%-----------------------------------------------------------------------------
%% Copyright (c) 2014, Feng Lee <feng.lee@slimchat.io>
%% Copyright (c) 2014, Feng Lee <feng@slimchat.io>
%%
%% Permission is hereby granted, free of charge, to any person obtaining a copy
%% of this software and associated documentation files (the "Software"), to deal
@ -22,7 +22,7 @@
-module(emqtt_auth_anonymous).
-author('feng.lee@slimchat.io').
-author('feng@slimchat.io').
-export([init/1,
add/2,

View File

@ -1,5 +1,5 @@
%%-----------------------------------------------------------------------------
%% Copyright (c) 2014, Feng Lee <feng.lee@slimchat.io>
%% Copyright (c) 2014, Feng Lee <feng@slimchat.io>
%%
%% Permission is hereby granted, free of charge, to any person obtaining a copy
%% of this software and associated documentation files (the "Software"), to deal

View File

@ -1,5 +1,5 @@
%%-----------------------------------------------------------------------------
%% Copyright (c) 2014, Feng Lee <feng.lee@slimchat.io>
%% Copyright (c) 2014, Feng Lee <feng@slimchat.io>
%%
%% Permission is hereby granted, free of charge, to any person obtaining a copy
%% of this software and associated documentation files (the "Software"), to deal

View File

@ -1,5 +1,5 @@
%%-----------------------------------------------------------------------------
%% Copyright (c) 2014, Feng Lee <feng.lee@slimchat.io>
%% Copyright (c) 2014, Feng Lee <feng@slimchat.io>
%%
%% Permission is hereby granted, free of charge, to any person obtaining a copy
%% of this software and associated documentation files (the "Software"), to deal
@ -23,7 +23,7 @@
%client manager
-module(emqtt_cm).
-author('feng.lee@slimchat.io').
-author('feng@slimchat.io').
-behaviour(gen_server).

View File

@ -1,5 +1,5 @@
%%-----------------------------------------------------------------------------
%% Copyright (c) 2014, Feng Lee <feng.lee@slimchat.io>
%% Copyright (c) 2014, Feng Lee <feng@slimchat.io>
%%
%% Permission is hereby granted, free of charge, to any person obtaining a copy
%% of this software and associated documentation files (the "Software"), to deal
@ -22,6 +22,8 @@
-module(emqtt_ctl).
-author('feng@slimchat.io').
-include("emqtt.hrl").
-include("emqtt_log.hrl").

View File

@ -1,5 +1,5 @@
%%-----------------------------------------------------------------------------
%% Copyright (c) 2014, Feng Lee <feng.lee@slimchat.io>
%% Copyright (c) 2014, Feng Lee <feng@slimchat.io>
%%
%% Permission is hereby granted, free of charge, to any person obtaining a copy
%% of this software and associated documentation files (the "Software"), to deal
@ -22,6 +22,8 @@
-module(emqtt_db).
-author('feng@slimchat.io').
-export([init/0, stop/0]).
init() ->

View File

@ -1,5 +1,5 @@
%%------------------------------------------------------------------------------
%% Copyright (c) 2014, Feng Lee <feng.lee@slimchat.io>
%% Copyright (c) 2014, Feng Lee <feng@slimchat.io>
%%
%% Permission is hereby granted, free of charge, to any person obtaining a copy
%% of this software and associated documentation files (the "Software"), to deal

View File

@ -1,5 +1,5 @@
%%------------------------------------------------------------------------------
%% Copyright (c) 2014, Feng Lee <feng.lee@slimchat.io>
%% Copyright (c) 2014, Feng Lee <feng@slimchat.io>
%%
%% Permission is hereby granted, free of charge, to any person obtaining a copy
%% of this software and associated documentation files (the "Software"), to deal
@ -22,6 +22,8 @@
-module(emqtt_http).
-author('feng@slimchat.io').
-include("emqtt.hrl").
-import(proplists, [get_value/2, get_value/3]).

View File

@ -1,5 +1,5 @@
%%-----------------------------------------------------------------------------
%% Copyright (c) 2014, Feng Lee <feng.lee@slimchat.io>
%% Copyright (c) 2014, Feng Lee <feng@slimchat.io>
%%
%% Permission is hereby granted, free of charge, to any person obtaining a copy
%% of this software and associated documentation files (the "Software"), to deal
@ -19,8 +19,11 @@
%% OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
%% SOFTWARE.
%%------------------------------------------------------------------------------
-module(emqtt_keep_alive).
-author('feng@slimchat.io').
-export([new/2,
state/1,
activate/1,

View File

@ -1,5 +1,5 @@
%%-----------------------------------------------------------------------------
%% Copyright (c) 2014, Feng Lee <feng.lee@slimchat.io>
%% Copyright (c) 2014, Feng Lee <feng@slimchat.io>
%%
%% Permission is hereby granted, free of charge, to any person obtaining a copy
%% of this software and associated documentation files (the "Software"), to deal
@ -22,6 +22,8 @@
-module(emqtt_monitor).
-author('feng@slimchat.io').
-include("emqtt_log.hrl").
-behavior(gen_server).

View File

@ -1,5 +1,5 @@
%%-----------------------------------------------------------------------------
%% Copyright (c) 2014, Feng Lee <feng.lee@slimchat.io>
%% Copyright (c) 2014, Feng Lee <feng@slimchat.io>
%%
%% Permission is hereby granted, free of charge, to any person obtaining a copy
%% of this software and associated documentation files (the "Software"), to deal
@ -22,6 +22,8 @@
-module(emqtt_net).
-author('feng@slimchat.io').
-export([tcp_name/3, tcp_host/1, getaddr/2, port_to_listeners/1]).
-export([connection_string/2]).

View File

@ -1,5 +1,5 @@
%%-----------------------------------------------------------------------------
%% Copyright (c) 2014, Feng Lee <feng.lee@slimchat.io>
%% Copyright (c) 2014, Feng Lee <feng@slimchat.io>
%%
%% Permission is hereby granted, free of charge, to any person obtaining a copy
%% of this software and associated documentation files (the "Software"), to deal
@ -22,6 +22,8 @@
-module(emqtt_pubsub).
-author('feng@slimchat.io').
-include("emqtt.hrl").
-include("emqtt_log.hrl").

View File

@ -1,5 +1,5 @@
%%-----------------------------------------------------------------------------
%% Copyright (c) 2014, Feng Lee <feng.lee@slimchat.io>
%% Copyright (c) 2014, Feng Lee <feng@slimchat.io>
%%
%% Permission is hereby granted, free of charge, to any person obtaining a copy
%% of this software and associated documentation files (the "Software"), to deal
@ -22,6 +22,8 @@
-module(emqtt_retained).
-author('feng@slimchat.io').
%%
%% <<MQTT_V3.1_Protocol_Specific>>

View File

@ -1,5 +1,5 @@
%%-----------------------------------------------------------------------------
%% Copyright (c) 2014, Feng Lee <feng.lee@slimchat.io>
%% Copyright (c) 2014, Feng Lee <feng@slimchat.io>
%%
%% Permission is hereby granted, free of charge, to any person obtaining a copy
%% of this software and associated documentation files (the "Software"), to deal
@ -22,6 +22,8 @@
-module(emqtt_sup).
-author('feng@slimchat.io').
-include("emqtt.hrl").
-behaviour(supervisor).

View File

@ -1,5 +1,5 @@
%%-----------------------------------------------------------------------------
%% Copyright (c) 2014, Feng Lee <feng.lee@slimchat.io>
%% Copyright (c) 2014, Feng Lee <feng@slimchat.io>
%%
%% Permission is hereby granted, free of charge, to any person obtaining a copy
%% of this software and associated documentation files (the "Software"), to deal
@ -19,8 +19,11 @@
%% OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
%% SOFTWARE.
%%------------------------------------------------------------------------------
-module(emqtt_topic).
-author('feng@slimchat.io').
-import(lists, [reverse/1]).
-import(string, [rchr/2, substr/2, substr/3]).