浏览代码

ft: 代码优化

master
SisMaker 3 年前
父节点
当前提交
1ccd54d851
共有 4 个文件被更改,包括 9 次插入4 次删除
  1. +5
    -0
      include/eNet.hrl
  2. +2
    -2
      include/ntProxyPt.hrl
  3. +1
    -1
      src/proxyPt/ntPptAcceptor.erl
  4. +1
    -1
      src/proxyPt/nt_proxy_protocol.erl

+ 5
- 0
include/eNet.hrl 查看文件

@ -1,3 +1,6 @@
-ifndef(eNet_H).
-define(eNet_H, true).
%% gen_tcp ready maybe to set sock options
%% ssl ready and then need do ntSslAcceptor:handshake/3 and maybe to set other options
%% ppt ready and then need do ntPptAcceptor:pptAndHS/5 and maybe to set other options
@ -40,3 +43,5 @@
, lastTime :: pos_integer() %% 访
, bucketSize :: pos_integer() %%
}).
-endif.

include/proxyPt.hrl → include/ntProxyPt.hrl 查看文件

@ -1,5 +1,5 @@
-ifndef(UT_PROXY_PT_H).
-define(UT_PROXY_PT_H, true).
-ifndef(ntProxyPt_H).
-define(ntProxyPt_H, true).
%%--------------------------------------------------------------------
%% Proxy-Protocol Socket Wrapper

+ 1
- 1
src/proxyPt/ntPptAcceptor.erl 查看文件

@ -2,7 +2,7 @@
-include("eNet.hrl").
-include("ntCom.hrl").
-include("proxyPt.hrl").
-include("ntProxyPt.hrl").
-compile(inline).
-compile({inline_size, 128}).

+ 1
- 1
src/proxyPt/nt_proxy_protocol.erl 查看文件

@ -17,7 +17,7 @@
%% @doc [Proxy Protocol](https://www.haproxy.org/download/1.8/doc/proxy-protocol.txt)
-module(nt_proxy_protocol).
-include("proxyPt.hrl").
-include("ntProxyPt.hrl").
-export([recv/2]).

正在加载...
取消
保存