From 1ccd54d851d7bc2968f269b4894cb07da6db3630 Mon Sep 17 00:00:00 2001 From: SisMaker <156736github> Date: Sat, 15 Jan 2022 00:30:09 +0800 Subject: [PATCH] =?UTF-8?q?ft:=20=E4=BB=A3=E7=A0=81=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/eNet.hrl | 5 +++++ include/{proxyPt.hrl => ntProxyPt.hrl} | 4 ++-- src/proxyPt/ntPptAcceptor.erl | 2 +- src/proxyPt/nt_proxy_protocol.erl | 2 +- 4 files changed, 9 insertions(+), 4 deletions(-) rename include/{proxyPt.hrl => ntProxyPt.hrl} (96%) diff --git a/include/eNet.hrl b/include/eNet.hrl index 9f42460..1df6b55 100644 --- a/include/eNet.hrl +++ b/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. \ No newline at end of file diff --git a/include/proxyPt.hrl b/include/ntProxyPt.hrl similarity index 96% rename from include/proxyPt.hrl rename to include/ntProxyPt.hrl index 00253f7..b9f0d33 100644 --- a/include/proxyPt.hrl +++ b/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 diff --git a/src/proxyPt/ntPptAcceptor.erl b/src/proxyPt/ntPptAcceptor.erl index 82f36ff..9c6b233 100644 --- a/src/proxyPt/ntPptAcceptor.erl +++ b/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}). diff --git a/src/proxyPt/nt_proxy_protocol.erl b/src/proxyPt/nt_proxy_protocol.erl index e2a6ab3..b3ae7bc 100644 --- a/src/proxyPt/nt_proxy_protocol.erl +++ b/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]).