SisMaker 4 anni fa
parent
commit
7b4403f6c4
11 ha cambiato i file con 18 aggiunte e 18 eliminazioni
  1. +2
    -2
      README.md
  2. +0
    -0
      include/eNet.hrl
  3. +3
    -3
      rebar.config
  4. +1
    -1
      src/comMod/nlTokenBucket.erl
  5. +2
    -2
      src/eNet.app.src
  6. +4
    -4
      src/eNet.erl
  7. +2
    -2
      src/eNet_app.erl
  8. +1
    -1
      src/eNet_sup.erl
  9. +1
    -1
      src/tcpMod/nlTcpAcceptor.erl
  10. +1
    -1
      src/tcpMod/nlTcpListener.erl
  11. +1
    -1
      src/tcpMod/nlTcpMgrSup.erl

+ 2
- 2
README.md Vedi File

@ -1,7 +1,7 @@
# erlNetLib
# eNet
erlang网络库
{ok, Pid} = erlNetLib:addTcpLr(test11, {{127,0,0, 1}, 9010}, echo_server, [{tcpOpts, [binary, {packet, 2}, {active, false}]}]).
{ok, Pid} = eNet:addTcpLr(test11, {{127,0,0, 1}, 9010}, echo_server, [{tcpOpts, [binary, {packet, 2}, {active, false}]}]).
{ok, S} = gen_tcp:connect({127,0,0, 1}, 9007, [{binary, {packet, 2}}]).
{ok, S} = gen_tcp:connect({127,0,0, 1}, 9007, [binary]).

include/erlNetLib.hrl → include/eNet.hrl Vedi File


+ 3
- 3
rebar.config Vedi File

@ -1,7 +1,7 @@
{erl_opts, [{i, "include"}, warn_unused_vars, warn_shadow_vars, warn_unused_import, warn_obsolete_guard, debug_info]}.
%{deps, [
% {eSync, ".*", {git, "http://47.108.26.175:53000/SisMaker/eSync.git", {branch, "master"}}}
%]}.
{deps, [
{eSync, ".*", {git, "http://47.108.26.175:53000/SisMaker/eSync.git", {branch, "master"}}}
]}.

+ 1
- 1
src/comMod/nlTokenBucket.erl Vedi File

@ -14,7 +14,7 @@
%%
%%
-module(nlTokenBucket).
-include("erlNetLib.hrl").
-include("eNet.hrl").
-export([
new/1

src/erlNetLib.app.src → src/eNet.app.src Vedi File

@ -1,8 +1,8 @@
{application, erlNetLib,
{application, eNet,
[{description, "An OTP application"},
{vsn, "0.1.0"},
{registered, []},
{mod, {erlNetLib_app, []}},
{mod, {eNet_app, []}},
{applications,
[kernel, stdlib]},
{env,[]},

src/erlNetLib.erl → src/eNet.erl Vedi File

@ -1,6 +1,6 @@
-module(erlNetLib).
-module(eNet).
-include("erlNetLib.hrl").
-include("eNet.hrl").
-define(TCP_DEFAULT_OPTIONS, [
binary
@ -21,7 +21,7 @@
-spec start() -> ok.
start() ->
{ok, _} = application:ensure_all_started(erlNetLib),
{ok, _} = application:ensure_all_started(eNet),
ok.
%% add a TCP listener
@ -37,7 +37,7 @@ addTcpLr(ListenName, AddrPort, ConMod, ListenOpt) ->
type => supervisor,
modules => [?nlTcpMgrSup]
},
{ok, _Pid} = erlNetLib_sup:startChild(TcpMgrSupSpec);
{ok, _Pid} = eNet_sup:startChild(TcpMgrSupSpec);
_ ->
ignore
end,

src/erlNetLib_app.erl → src/eNet_app.erl Vedi File

@ -1,11 +1,11 @@
-module(erlNetLib_app).
-module(eNet_app).
-behaviour(application).
-export([start/2, stop/1]).
start(_StartType, _StartArgs) ->
erlNetLib_sup:start_link().
eNet_sup:start_link().
stop(_State) ->
ok.

src/erlNetLib_sup.erl → src/eNet_sup.erl Vedi File

@ -1,4 +1,4 @@
-module(erlNetLib_sup).
-module(eNet_sup).
-behaviour(supervisor).
-export([

+ 1
- 1
src/tcpMod/nlTcpAcceptor.erl Vedi File

@ -1,5 +1,5 @@
-module(nlTcpAcceptor).
-include("erlNetLib.hrl").
-include("eNet.hrl").
-compile(inline).
-compile({inline_size, 128}).

+ 1
- 1
src/tcpMod/nlTcpListener.erl Vedi File

@ -1,5 +1,5 @@
-module(nlTcpListener).
-include("erlNetLib.hrl").
-include("eNet.hrl").
%%

+ 1
- 1
src/tcpMod/nlTcpMgrSup.erl Vedi File

@ -1,5 +1,5 @@
-module(nlTcpMgrSup).
-include("erlNetLib.hrl").
-include("eNet.hrl").
-behaviour(supervisor).

Caricamento…
Annulla
Salva