Skip to content

Commit

Permalink
20210901
Browse files Browse the repository at this point in the history
  • Loading branch information
ldcsaa committed Aug 31, 2021
1 parent c15be8c commit 48df619
Show file tree
Hide file tree
Showing 85 changed files with 350 additions and 370 deletions.
5 changes: 5 additions & 0 deletions Linux/ChangeLog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ v5.8.5 Update:
2. Add MSBUILD one-click compilation script.
3. Code optimization to improve code robustness.

> Third-party library Upadate
-----------------
1. openssl upgrade to version 1.1.1l.
2. llhttp upgrade to version 6.0.5.

==========================================================================================
v5.8.4 Update:
==========================================================================================
Expand Down
2 changes: 1 addition & 1 deletion Linux/include/hpsocket/HPTypeDef.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#define HP_VERSION_MAJOR 5 // 主版本号
#define HP_VERSION_MINOR 8 // 子版本号
#define HP_VERSION_REVISE 5 // 修正版本号
#define HP_VERSION_BUILD 3 // 构建编号
#define HP_VERSION_BUILD 4 // 构建编号

//#define _UDP_DISABLED // 禁用 UDP
//#define _SSL_DISABLED // 禁用 SSL
Expand Down
2 changes: 1 addition & 1 deletion Linux/project/Version.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<VER_MAJOR>5</VER_MAJOR>
<VER_MINOR>8</VER_MINOR>
<VER_REVISE>5</VER_REVISE>
<VER_BUILD>3</VER_BUILD>
<VER_BUILD>4</VER_BUILD>
<ArmDeptToCopyRemotely>..\..\dependent\arm\include\brotli\decode.h:=$(RemoteRootDir)/dependent/arm/include/brotli/decode.h;..\..\dependent\arm\include\brotli\encode.h:=$(RemoteRootDir)/dependent/arm/include/brotli/encode.h;..\..\dependent\arm\include\brotli\port.h:=$(RemoteRootDir)/dependent/arm/include/brotli/port.h;..\..\dependent\arm\include\brotli\types.h:=$(RemoteRootDir)/dependent/arm/include/brotli/types.h;..\..\dependent\arm\lib\libbrotli.a:=$(RemoteRootDir)/dependent/arm/lib/libbrotli.a;..\..\dependent\arm\lib\libjemalloc_pic.a:=$(RemoteRootDir)/dependent/arm/lib/libjemalloc_pic.a;..\..\dependent\arm\lib\libmimalloc.a:=$(RemoteRootDir)/dependent/arm/lib/libmimalloc.a</ArmDeptToCopyRemotely>
<Arm64DeptToCopyRemotely>..\..\dependent\arm64\include\brotli\decode.h:=$(RemoteRootDir)/dependent/arm64/include/brotli/decode.h;..\..\dependent\arm64\include\brotli\encode.h:=$(RemoteRootDir)/dependent/arm64/include/brotli/encode.h;..\..\dependent\arm64\include\brotli\port.h:=$(RemoteRootDir)/dependent/arm64/include/brotli/port.h;..\..\dependent\arm64\include\brotli\types.h:=$(RemoteRootDir)/dependent/arm64/include/brotli/types.h;..\..\dependent\arm64\lib\libbrotli.a:=$(RemoteRootDir)/dependent/arm64/lib/libbrotli.a;..\..\dependent\arm64\lib\libjemalloc_pic.a:=$(RemoteRootDir)/dependent/arm64/lib/libjemalloc_pic.a;..\..\dependent\arm64\lib\libmimalloc.a:=$(RemoteRootDir)/dependent/arm64/lib/libmimalloc.a</Arm64DeptToCopyRemotely>
<ArmScriptToCopyRemotely>..\..\script\clean.sh:=$(RemoteRootDir)/script/clean.sh;..\..\script\cp-dependent.sh:=$(RemoteRootDir)/script/cp-dependent.sh;..\..\script\cp-include.sh:=$(RemoteRootDir)/script/cp-include.sh;..\..\script\env.sh:=$(RemoteRootDir)/script/env.sh;..\..\script\post-link.sh:=$(RemoteRootDir)/script/post-link.sh;..\..\script\pre-link.sh:=$(RemoteRootDir)/script/pre-link.sh;..\..\compile.sh:=$(RemoteRootDir)/compile.sh;..\..\install.sh:=$(RemoteRootDir)/install.sh</ArmScriptToCopyRemotely>
Expand Down
3 changes: 1 addition & 2 deletions Linux/src/HPSocket4C.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#include "TcpPackServer.h"
#include "TcpPackClient.h"
#include "TcpPackAgent.h"
#include "HPThreadPool.h"

#ifdef _UDP_SUPPORT
#include "UdpServer.h"
Expand All @@ -47,8 +48,6 @@
#include "HttpClient.h"
#endif

#include "HPThreadPool.h"

/*****************************************************************************************************************************************************/
/****************************************************************** TCP/UDP Exports ******************************************************************/
/*****************************************************************************************************************************************************/
Expand Down
6 changes: 3 additions & 3 deletions Linux/src/HPThreadPool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ BOOL CHPThreadPool::Shutdown(DWORD dwMaxWait)
BOOL isOK = TRUE;
BOOL bLimited = (m_dwMaxQueueSize != 0);
BOOL bInfinite = (dwMaxWait == (DWORD)INFINITE || dwMaxWait == 0);
auto prdShutdown = [&]() {return m_stThreads.empty();};
auto prdShutdown = [this]() {return m_stThreads.empty();};

if(m_enRejectedPolicy == TRP_WAIT_FOR && bLimited)
m_evQueue.SyncNotifyAll();
Expand Down Expand Up @@ -238,7 +238,7 @@ BOOL CHPThreadPool::CycleWaitSubmit(Fn_TaskProc fnTaskProc, PVOID pvArg, DWORD d

DWORD dwTime = ::TimeGetTime();
BOOL bInfinite = (dwMaxWait == (DWORD)INFINITE || dwMaxWait == 0);
auto prdQueue = [&]() {return (m_lsTasks.Size() < m_dwMaxQueueSize);};
auto prdQueue = [this]() {return (m_lsTasks.Size() < m_dwMaxQueueSize);};

while(CheckStarted())
{
Expand Down Expand Up @@ -379,7 +379,7 @@ int CHPThreadPool::WorkerProc()
{
BOOL bLimited = (m_dwMaxQueueSize != 0);
TTask* pTask = nullptr;
auto prdTask = [&]() {return (!m_lsTasks.IsEmpty()) || (m_dwThreadCount < m_stThreads.size());};
auto prdTask = [this]() {return (!m_lsTasks.IsEmpty()) || (m_dwThreadCount < m_stThreads.size());};

while(TRUE)
{
Expand Down
2 changes: 1 addition & 1 deletion Linux/src/HPThreadPool.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class CHPThreadPool : public IHPThreadPool
public:
virtual BOOL Start(DWORD dwThreadCount = 0, DWORD dwMaxQueueSize = 0, EnRejectedPolicy enRejectedPolicy = TRP_CALL_FAIL, DWORD dwStackSize = 0);
virtual BOOL Stop(DWORD dwMaxWait = INFINITE);
virtual BOOL Wait(DWORD dwMilliseconds = INFINITE) {return m_evWait.WaitFor(dwMilliseconds, CStopWaitingPredicate<IHPThreadPool>(this));}
virtual BOOL Wait(DWORD dwMilliseconds = INFINITE) {return m_evWait.WaitFor(dwMilliseconds, WAIT_FOR_STOP_PREDICATE);}

virtual BOOL Submit(Fn_TaskProc fnTaskProc, PVOID pvArg, DWORD dwMaxWait = INFINITE);
virtual BOOL Submit(LPTSocketTask pTask, DWORD dwMaxWait = INFINITE);
Expand Down
22 changes: 1 addition & 21 deletions Linux/src/InternalDef.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,24 +120,4 @@

#define ENSURE_STOP() {if(GetState() != SS_STOPPED) {Stop();} Wait();}
#define ENSURE_HAS_STOPPED() {ASSERT(GetState() == SS_STOPPED); if(GetState() != SS_STOPPED) return;}

/* 停止等待条件对象 */
template<typename T> class CStopWaitingPredicate
{
public:
BOOL operator()()
{
return m_pThis->GetState() == SS_STOPPED;
}

public:
CStopWaitingPredicate(T* pThis)
: m_pThis(pThis)
{

}

private:
T* m_pThis;
};

#define WAIT_FOR_STOP_PREDICATE [this]() {return GetState() == SS_STOPPED;}
37 changes: 23 additions & 14 deletions Linux/src/TcpAgent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,11 +186,14 @@ void CTcpAgent::DisconnectClientSocket()
{
::WaitFor(100);

DWORD size = 0;
unique_ptr<CONNID[]> ids = m_bfActiveSockets.GetAllElementIndexes(size);
if(m_bfActiveSockets.Elements() == 0)
return;

TAgentSocketObjPtrPool::IndexSet indexes;
m_bfActiveSockets.CopyIndexes(indexes);

for(DWORD i = 0; i < size; i++)
Disconnect(ids[i]);
for(auto it = indexes.begin(), end = indexes.end(); it != end; ++it)
Disconnect(*it);
}

void CTcpAgent::WaitForClientSocketClose()
Expand Down Expand Up @@ -788,14 +791,17 @@ BOOL CTcpAgent::DisconnectLongConnections(DWORD dwPeriod, BOOL bForce)
{
if(dwPeriod > MAX_CONNECTION_PERIOD)
return FALSE;
if(m_bfActiveSockets.Elements() == 0)
return TRUE;

DWORD size = 0;
unique_ptr<CONNID[]> ids = m_bfActiveSockets.GetAllElementIndexes(size);
DWORD now = ::TimeGetTime();
DWORD now = ::TimeGetTime();

for(DWORD i = 0; i < size; i++)
TAgentSocketObjPtrPool::IndexSet indexes;
m_bfActiveSockets.CopyIndexes(indexes);

for(auto it = indexes.begin(), end = indexes.end(); it != end; ++it)
{
CONNID connID = ids[i];
CONNID connID = *it;
TAgentSocketObj* pSocketObj = FindSocketObj(connID);

if(TAgentSocketObj::IsValid(pSocketObj) && (int)(now - pSocketObj->connTime) >= (int)dwPeriod)
Expand All @@ -811,14 +817,17 @@ BOOL CTcpAgent::DisconnectSilenceConnections(DWORD dwPeriod, BOOL bForce)
return FALSE;
if(dwPeriod > MAX_CONNECTION_PERIOD)
return FALSE;
if(m_bfActiveSockets.Elements() == 0)
return TRUE;

DWORD now = ::TimeGetTime();

DWORD size = 0;
unique_ptr<CONNID[]> ids = m_bfActiveSockets.GetAllElementIndexes(size);
DWORD now = ::TimeGetTime();
TAgentSocketObjPtrPool::IndexSet indexes;
m_bfActiveSockets.CopyIndexes(indexes);

for(DWORD i = 0; i < size; i++)
for(auto it = indexes.begin(), end = indexes.end(); it != end; ++it)
{
CONNID connID = ids[i];
CONNID connID = *it;
TAgentSocketObj* pSocketObj = FindSocketObj(connID);

if(TAgentSocketObj::IsValid(pSocketObj) && (int)(now - pSocketObj->activeTime) >= (int)dwPeriod)
Expand Down
4 changes: 2 additions & 2 deletions Linux/src/TcpAgent.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class CTcpAgent : public ITcpAgent, private CIOHandler
virtual BOOL SendSmallFile (CONNID dwConnID, LPCTSTR lpszFileName, const LPWSABUF pHead = nullptr, const LPWSABUF pTail = nullptr);
virtual BOOL SendPackets (CONNID dwConnID, const WSABUF pBuffers[], int iCount) {return DoSendPackets(dwConnID, pBuffers, iCount);}
virtual BOOL PauseReceive (CONNID dwConnID, BOOL bPause = TRUE);
virtual BOOL Wait (DWORD dwMilliseconds = INFINITE) {return m_evWait.WaitFor(dwMilliseconds, CStopWaitingPredicate<IComplexSocket>(this));}
virtual BOOL Wait (DWORD dwMilliseconds = INFINITE) {return m_evWait.WaitFor(dwMilliseconds, WAIT_FOR_STOP_PREDICATE);}
virtual BOOL HasStarted () {return m_enState == SS_STARTED || m_enState == SS_STARTING;}
virtual EnServiceState GetState () {return m_enState;}
virtual BOOL Disconnect (CONNID dwConnID, BOOL bForce = TRUE);
Expand All @@ -59,7 +59,7 @@ class CTcpAgent : public ITcpAgent, private CIOHandler

#ifdef _SSL_SUPPORT
virtual BOOL SetupSSLContext (int iVerifyMode = SSL_VM_NONE, LPCTSTR lpszPemCertFile = nullptr, LPCTSTR lpszPemKeyFile = nullptr, LPCTSTR lpszKeyPassword = nullptr, LPCTSTR lpszCAPemCertFileOrPath = nullptr) {return FALSE;}
virtual BOOL SetupSSLContextByMemory(int iVerifyMode = SSL_VM_NONE, LPCSTR lpszPemCert = nullptr, LPCSTR lpszPemKey = nullptr, LPCSTR lpszKeyPassword = nullptr, LPCSTR lpszCAPemCert = nullptr) {return FALSE;}
virtual BOOL SetupSSLContextByMemory(int iVerifyMode = SSL_VM_NONE, LPCSTR lpszPemCert = nullptr, LPCSTR lpszPemKey = nullptr, LPCSTR lpszKeyPassword = nullptr, LPCSTR lpszCAPemCert = nullptr) {return FALSE;}
virtual void CleanupSSLContext () {}

virtual BOOL StartSSLHandShake (CONNID dwConnID) {return FALSE;}
Expand Down
4 changes: 2 additions & 2 deletions Linux/src/TcpClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class CTcpClient : public ITcpClient
virtual BOOL SendSmallFile (LPCTSTR lpszFileName, const LPWSABUF pHead = nullptr, const LPWSABUF pTail = nullptr);
virtual BOOL SendPackets (const WSABUF pBuffers[], int iCount) {return DoSendPackets(pBuffers, iCount);}
virtual BOOL PauseReceive (BOOL bPause = TRUE);
virtual BOOL Wait (DWORD dwMilliseconds = INFINITE) {return m_evWait.WaitFor(dwMilliseconds, CStopWaitingPredicate<IClient>(this));}
virtual BOOL Wait (DWORD dwMilliseconds = INFINITE) {return m_evWait.WaitFor(dwMilliseconds, WAIT_FOR_STOP_PREDICATE);}
virtual BOOL HasStarted () {return m_enState == SS_STARTED || m_enState == SS_STARTING;}
virtual EnServiceState GetState () {return m_enState;}
virtual CONNID GetConnectionID () {return m_dwConnID;}
Expand All @@ -50,7 +50,7 @@ class CTcpClient : public ITcpClient

#ifdef _SSL_SUPPORT
virtual BOOL SetupSSLContext (int iVerifyMode = SSL_VM_NONE, LPCTSTR lpszPemCertFile = nullptr, LPCTSTR lpszPemKeyFile = nullptr, LPCTSTR lpszKeyPassword = nullptr, LPCTSTR lpszCAPemCertFileOrPath = nullptr) {return FALSE;}
virtual BOOL SetupSSLContextByMemory(int iVerifyMode = SSL_VM_NONE, LPCSTR lpszPemCert = nullptr, LPCSTR lpszPemKey = nullptr, LPCSTR lpszKeyPassword = nullptr, LPCSTR lpszCAPemCert = nullptr) {return FALSE;}
virtual BOOL SetupSSLContextByMemory(int iVerifyMode = SSL_VM_NONE, LPCSTR lpszPemCert = nullptr, LPCSTR lpszPemKey = nullptr, LPCSTR lpszKeyPassword = nullptr, LPCSTR lpszCAPemCert = nullptr) {return FALSE;}
virtual void CleanupSSLContext () {}

virtual BOOL StartSSLHandShake () {return FALSE;}
Expand Down
37 changes: 23 additions & 14 deletions Linux/src/TcpServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -219,11 +219,14 @@ void CTcpServer::CloseListenSocket()

void CTcpServer::DisconnectClientSocket()
{
DWORD size = 0;
unique_ptr<CONNID[]> ids = m_bfActiveSockets.GetAllElementIndexes(size);
if(m_bfActiveSockets.Elements() == 0)
return;

TSocketObjPtrPool::IndexSet indexes;
m_bfActiveSockets.CopyIndexes(indexes);

for(DWORD i = 0; i < size; i++)
Disconnect(ids[i]);
for(auto it = indexes.begin(), end = indexes.end(); it != end; ++it)
Disconnect(*it);
}

void CTcpServer::WaitForClientSocketClose()
Expand Down Expand Up @@ -622,14 +625,17 @@ BOOL CTcpServer::DisconnectLongConnections(DWORD dwPeriod, BOOL bForce)
{
if(dwPeriod > MAX_CONNECTION_PERIOD)
return FALSE;
if(m_bfActiveSockets.Elements() == 0)
return TRUE;

DWORD size = 0;
unique_ptr<CONNID[]> ids = m_bfActiveSockets.GetAllElementIndexes(size);
DWORD now = ::TimeGetTime();
DWORD now = ::TimeGetTime();

for(DWORD i = 0; i < size; i++)
TSocketObjPtrPool::IndexSet indexes;
m_bfActiveSockets.CopyIndexes(indexes);

for(auto it = indexes.begin(), end = indexes.end(); it != end; ++it)
{
CONNID connID = ids[i];
CONNID connID = *it;
TSocketObj* pSocketObj = FindSocketObj(connID);

if(TSocketObj::IsValid(pSocketObj) && (int)(now - pSocketObj->connTime) >= (int)dwPeriod)
Expand All @@ -645,14 +651,17 @@ BOOL CTcpServer::DisconnectSilenceConnections(DWORD dwPeriod, BOOL bForce)
return FALSE;
if(dwPeriod > MAX_CONNECTION_PERIOD)
return FALSE;
if(m_bfActiveSockets.Elements() == 0)
return TRUE;

DWORD now = ::TimeGetTime();

DWORD size = 0;
unique_ptr<CONNID[]> ids = m_bfActiveSockets.GetAllElementIndexes(size);
DWORD now = ::TimeGetTime();
TSocketObjPtrPool::IndexSet indexes;
m_bfActiveSockets.CopyIndexes(indexes);

for(DWORD i = 0; i < size; i++)
for(auto it = indexes.begin(), end = indexes.end(); it != end; ++it)
{
CONNID connID = ids[i];
CONNID connID = *it;
TSocketObj* pSocketObj = FindSocketObj(connID);

if(TSocketObj::IsValid(pSocketObj) && (int)(now - pSocketObj->activeTime) >= (int)dwPeriod)
Expand Down
10 changes: 5 additions & 5 deletions Linux/src/TcpServer.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class CTcpServer : public ITcpServer, private CIOHandler
virtual BOOL SendSmallFile (CONNID dwConnID, LPCTSTR lpszFileName, const LPWSABUF pHead = nullptr, const LPWSABUF pTail = nullptr);
virtual BOOL SendPackets (CONNID dwConnID, const WSABUF pBuffers[], int iCount) {return DoSendPackets(dwConnID, pBuffers, iCount);}
virtual BOOL PauseReceive (CONNID dwConnID, BOOL bPause = TRUE);
virtual BOOL Wait (DWORD dwMilliseconds = INFINITE) {return m_evWait.WaitFor(dwMilliseconds, CStopWaitingPredicate<IComplexSocket>(this));}
virtual BOOL Wait (DWORD dwMilliseconds = INFINITE) {return m_evWait.WaitFor(dwMilliseconds, WAIT_FOR_STOP_PREDICATE);}
virtual BOOL HasStarted () {return m_enState == SS_STARTED || m_enState == SS_STARTING;}
virtual EnServiceState GetState () {return m_enState;}
virtual BOOL Disconnect (CONNID dwConnID, BOOL bForce = TRUE);
Expand All @@ -58,10 +58,10 @@ class CTcpServer : public ITcpServer, private CIOHandler

#ifdef _SSL_SUPPORT
virtual BOOL SetupSSLContext (int iVerifyMode = SSL_VM_NONE, LPCTSTR lpszPemCertFile = nullptr, LPCTSTR lpszPemKeyFile = nullptr, LPCTSTR lpszKeyPassword = nullptr, LPCTSTR lpszCAPemCertFileOrPath = nullptr, Fn_SNI_ServerNameCallback fnServerNameCallback = nullptr) {return FALSE;}
virtual BOOL SetupSSLContextByMemory(int iVerifyMode = SSL_VM_NONE, LPCSTR lpszPemCert = nullptr, LPCSTR lpszPemKey = nullptr, LPCSTR lpszKeyPassword = nullptr, LPCSTR lpszCAPemCert = nullptr, Fn_SNI_ServerNameCallback fnServerNameCallback = nullptr) {return FALSE;}
virtual int AddSSLContext (int iVerifyMode = SSL_VM_NONE, LPCTSTR lpszPemCertFile = nullptr, LPCTSTR lpszPemKeyFile = nullptr, LPCTSTR lpszKeyPassword = nullptr, LPCTSTR lpszCAPemCertFileOrPath = nullptr) {return FALSE;}
virtual int AddSSLContextByMemory(int iVerifyMode = SSL_VM_NONE, LPCSTR lpszPemCert = nullptr, LPCSTR lpszPemKey = nullptr, LPCSTR lpszKeyPassword = nullptr, LPCSTR lpszCAPemCert = nullptr) {return FALSE;}
virtual BOOL BindSSLServerName (LPCTSTR lpszServerName, int iContextIndex) {return FALSE;}
virtual BOOL SetupSSLContextByMemory(int iVerifyMode = SSL_VM_NONE, LPCSTR lpszPemCert = nullptr, LPCSTR lpszPemKey = nullptr, LPCSTR lpszKeyPassword = nullptr, LPCSTR lpszCAPemCert = nullptr, Fn_SNI_ServerNameCallback fnServerNameCallback = nullptr) {return FALSE;}
virtual int AddSSLContext (int iVerifyMode = SSL_VM_NONE, LPCTSTR lpszPemCertFile = nullptr, LPCTSTR lpszPemKeyFile = nullptr, LPCTSTR lpszKeyPassword = nullptr, LPCTSTR lpszCAPemCertFileOrPath = nullptr) {return FALSE;}
virtual int AddSSLContextByMemory(int iVerifyMode = SSL_VM_NONE, LPCSTR lpszPemCert = nullptr, LPCSTR lpszPemKey = nullptr, LPCSTR lpszKeyPassword = nullptr, LPCSTR lpszCAPemCert = nullptr) {return FALSE;}
virtual BOOL BindSSLServerName (LPCTSTR lpszServerName, int iContextIndex) {return FALSE;}
virtual void CleanupSSLContext () {}

virtual BOOL StartSSLHandShake (CONNID dwConnID) {return FALSE;}
Expand Down
2 changes: 1 addition & 1 deletion Linux/src/UdpCast.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class CUdpCast : public IUdpCast
virtual BOOL Send (const BYTE* pBuffer, int iLength, int iOffset = 0);
virtual BOOL SendPackets (const WSABUF pBuffers[], int iCount);
virtual BOOL PauseReceive (BOOL bPause = TRUE);
virtual BOOL Wait (DWORD dwMilliseconds = INFINITE) {return m_evWait.WaitFor(dwMilliseconds, CStopWaitingPredicate<IClient>(this));}
virtual BOOL Wait (DWORD dwMilliseconds = INFINITE) {return m_evWait.WaitFor(dwMilliseconds, WAIT_FOR_STOP_PREDICATE);}
virtual BOOL HasStarted () {return m_enState == SS_STARTED || m_enState == SS_STARTING;}
virtual EnServiceState GetState () {return m_enState;}
virtual CONNID GetConnectionID () {return m_dwConnID;}
Expand Down
2 changes: 1 addition & 1 deletion Linux/src/UdpClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class CUdpClient : public IUdpClient
virtual BOOL Send (const BYTE* pBuffer, int iLength, int iOffset = 0) {return DoSend(pBuffer, iLength, iOffset);}
virtual BOOL SendPackets (const WSABUF pBuffers[], int iCount);
virtual BOOL PauseReceive (BOOL bPause = TRUE);
virtual BOOL Wait (DWORD dwMilliseconds = INFINITE) {return m_evWait.WaitFor(dwMilliseconds, CStopWaitingPredicate<IClient>(this));}
virtual BOOL Wait (DWORD dwMilliseconds = INFINITE) {return m_evWait.WaitFor(dwMilliseconds, WAIT_FOR_STOP_PREDICATE);}
virtual BOOL HasStarted () {return m_enState == SS_STARTED || m_enState == SS_STARTING;}
virtual EnServiceState GetState () {return m_enState;}
virtual CONNID GetConnectionID () {return m_dwConnID;}
Expand Down
2 changes: 1 addition & 1 deletion Linux/src/UdpNode.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class CUdpNode : public IUdpNode, private CIOHandler
virtual BOOL SendPackets (LPCTSTR lpszRemoteAddress, USHORT usRemotePort, const WSABUF pBuffers[], int iCount);
virtual BOOL SendCast (const BYTE* pBuffer, int iLength, int iOffset = 0);
virtual BOOL SendCastPackets(const WSABUF pBuffers[], int iCount);
virtual BOOL Wait (DWORD dwMilliseconds = INFINITE) {return m_evWait.WaitFor(dwMilliseconds, CStopWaitingPredicate<IUdpNode>(this));}
virtual BOOL Wait (DWORD dwMilliseconds = INFINITE) {return m_evWait.WaitFor(dwMilliseconds, WAIT_FOR_STOP_PREDICATE);}

virtual BOOL HasStarted () {return m_enState == SS_STARTED || m_enState == SS_STARTING;}
virtual EnServiceState GetState () {return m_enState;}
Expand Down
Loading

0 comments on commit 48df619

Please sign in to comment.