-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #22 from bosqueviejo/master
0.12.0 - Multiconnections
- Loading branch information
Showing
15 changed files
with
918 additions
and
326 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,3 @@ script : "./rebar compile && ./rebar skip_deps=true eunit" | |
otp_release: | ||
- R16B | ||
- R15B02 | ||
- R15B01 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
-include_lib("exmpp/include/exmpp_jid.hrl"). | ||
-include_lib("exmpp/include/exmpp.hrl"). | ||
-include_lib("exmpp/include/exmpp_client.hrl"). | ||
-include_lib("confetti/include/confetti.hrl"). | ||
-include("../include/ecomponent.hrl"). | ||
|
||
-type jid() :: { Name::string(), Server::string(), Resource::string() }. | ||
|
||
-type mod_processor() :: {mod, Module::atom()}. | ||
|
||
-type app_processor() :: {app, App::atom()}. | ||
|
||
-type message_processor() :: mod_processor() | app_processor(). | ||
|
||
-type presence_processor() :: mod_processor() | app_processor(). | ||
|
||
-type processor() :: {Name::atom(), Value::(mod_processor() | app_processor())}. | ||
|
||
-type accesslist() :: Domains::list(binary()). | ||
|
||
-export_type([jid/0]). | ||
|
||
-define(MAX_PER_PERIOD, 10). | ||
-define(PERIOD_SECONDS, 6). | ||
-define(MAX_TRIES, 3). | ||
-define(RESEND_PERIOD, 100). | ||
-define(REQUEST_TIMEOUT, 10). | ||
-define(SYSLOG_FACILITY, local7). | ||
-define(SYSLOG_NAME, "ecomponent"). | ||
|
||
-record(state, { | ||
jid :: jid(), | ||
whiteList = [] :: list(string()), | ||
maxPerPeriod = ?MAX_PER_PERIOD :: integer(), | ||
periodSeconds = ?PERIOD_SECONDS :: integer(), | ||
processors :: list(processor()), | ||
message_processor :: message_processor(), | ||
presence_processor :: presence_processor(), | ||
maxTries = ?MAX_TRIES :: integer(), | ||
resendPeriod = ?RESEND_PERIOD :: integer(), | ||
requestTimeout = ?REQUEST_TIMEOUT :: integer(), | ||
accessListSet = [] :: accesslist(), | ||
accessListGet = [] :: accesslist(), | ||
syslogFacility = ?SYSLOG_FACILITY :: atom(), | ||
syslogName = ?SYSLOG_NAME :: string(), | ||
timeout = undefined :: integer(), | ||
features = [] :: [binary()], | ||
info = [] :: proplists:proplists(), | ||
disco_info = true :: boolean() | ||
}). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.