소스 검색

ft: 代码修改

master
SisMaker 3 년 전
부모
커밋
2c54c3e612
10개의 변경된 파일24개의 추가작업 그리고 20개의 파일을 삭제
  1. +1
    -1
      README.md
  2. +0
    -0
      include/eWSrv.hrl
  3. +5
    -3
      include/wsCom.hrl
  4. +1
    -1
      src/test/elli_tests.erl
  5. +2
    -8
      src/wsSrv/elli.erl
  6. +1
    -1
      src/wsSrv/elli_example_callback.erl
  7. +2
    -2
      src/wsSrv/elli_http.erl
  8. +1
    -1
      src/wsSrv/elli_request.erl
  9. +1
    -1
      src/wsSrv/elli_test.erl
  10. +10
    -2
      src/wsSrv/elli_util.erl

+ 1
- 1
README.md 파일 보기

@ -34,7 +34,7 @@ A minimal callback module could look like this:
-module(elli_minimal_callback).
-export([handle/2, handle_event/3]).
-include_lib("elli/include/elli.hrl").
-include_lib("elli/include/eWSrv.hrl").
-behaviour(elli_handler).
handle(Req, _Args) ->

include/elli.hrl → include/eWSrv.hrl 파일 보기


src/wsSrv/elli_util.hrl → include/wsCom.hrl 파일 보기

@ -1,6 +1,8 @@
-ifdef(OTP_RELEASE).
-include_lib("kernel/include/logger.hrl").
-else.
-define(wsErr(Format, Args), error_logger:error_msg(Format, Args)).
-define(wsWarn(Format, Args), error_logger:warning_msg(Format, Args)).
-define(wsInfo(Format, Args), error_logger:info_msg(Format, Args)).
-define(wsGLV(Key, List, Default), elli_util:getLValue(Key, List, Default)).
-define(LOG_ERROR(Str), error_logger:error_msg(Str)).
-define(LOG_ERROR(Format, Data), error_logger:error_msg(Format, Data)).
-define(LOG_INFO(Format, Data), error_logger:info_msg(Format, Data)).

+ 1
- 1
src/test/elli_tests.erl 파일 보기

@ -1,6 +1,6 @@
-module(elli_tests).
-include_lib("eunit/include/eunit.hrl").
-include("elli.hrl").
-include("eWSrv.hrl").
-include("elli_test.hrl").
-define(README, "README.md").

+ 2
- 8
src/wsSrv/elli.erl 파일 보기

@ -1,13 +1,7 @@
%% @doc: Elli acceptor manager
%%
%% This gen_server owns the listen socket and manages the processes
%% accepting on that socket. When a process waiting for accept gets a
%% request, it notifies this gen_server so we can start up another
%% acceptor.
%%
-module(elli).
-behaviour(gen_server).
-include("elli.hrl").
-include("eWSrv.hrl").
-include("elli_util.hrl").
%% API

+ 1
- 1
src/wsSrv/elli_example_callback.erl 파일 보기

@ -10,7 +10,7 @@
-export([handle/2, handle_event/3]).
-export([chunk_loop/1]).
-include("elli.hrl").
-include("eWSrv.hrl").
-include("elli_util.hrl").
-behaviour(elli_handler).

+ 2
- 2
src/wsSrv/elli_http.erl 파일 보기

@ -4,8 +4,8 @@
%% connects. It then handles requests on that connection until it's
%% closed either by the client timing out or explicitly by the user.
-module(elli_http).
-include("elli.hrl").
-include("elli_util.hrl").
-include("eWSrv.hrl").
-include("wsCom.hrl").
%% API

+ 1
- 1
src/wsSrv/elli_request.erl 파일 보기

@ -1,5 +1,5 @@
-module(elli_request).
-include("elli.hrl").
-include("eWSrv.hrl").
-include("elli_util.hrl").
-export([send_chunk/2

+ 1
- 1
src/wsSrv/elli_test.erl 파일 보기

@ -8,7 +8,7 @@
-module(elli_test).
-include("elli.hrl").
-include("eWSrv.hrl").
-export([call/5]).

+ 10
- 2
src/wsSrv/elli_util.erl 파일 보기

@ -1,6 +1,6 @@
-module(elli_util).
-include("elli.hrl").
-include("elli_util.hrl").
-include("eWSrv.hrl").
-include("wsCom.hrl").
-include_lib("kernel/include/file.hrl").
@ -69,3 +69,11 @@ file_size(Filename) ->
{error, Reason} -> {error, Reason};
_ -> {error, invalid_file}
end.
getLValue(Key, List, Default) ->
case lists:keyfind(Key, 1, List) of
false ->
Default;
{Key, Value} ->
Value
end.

불러오는 중...
취소
저장