133 #include "../core/stdafx.hpp"
136 #include "../core/OTLog.hpp"
137 #include "../core/OTSettings.hpp"
139 #define KEY_LATENCY_SEND_MS "latency_send_ms"
140 #define KEY_LATENCY_SEND_NO_TRIES "latency_send_no_tries"
141 #define KEY_LATENCY_RECEIVE_MS "latency_receive_ms"
142 #define KEY_LATENCY_RECEIVE_NO_TRIES "latency_receive_no_tries"
143 #define KEY_LATENCY_DELAY_AFTER "latency_delay_after"
144 #define KEY_IS_BLOCKING "is_blocking"
152 , m_lLatencySendMs(0)
153 , m_nLatencySendNoTries(0)
154 , m_lLatencyReceiveMs(0)
155 , m_nLatencyReceiveNoTries(0)
156 , m_lLatencyDelayAfter(0)
157 , m_bIsBlocking(false)
158 , m_bInitialized(false)
159 , m_HasContext(false)
160 , m_bConnected(false)
161 , m_bListening(false)
162 , m_strConnectPath(
"")
163 , m_strBindingPath(
"")
168 int32_t nLatencySendNoTries,
169 int64_t lLatencyReceiveMs,
170 int32_t nLatencyReceiveNoTries,
171 int64_t lLatencyDelayAfter,
bool bIsBlocking)
172 : m_lLatencySendMs(lLatencySendMs)
173 , m_nLatencySendNoTries(nLatencySendNoTries)
174 , m_lLatencyReceiveMs(lLatencyReceiveMs)
175 , m_nLatencyReceiveNoTries(nLatencyReceiveNoTries)
176 , m_lLatencyDelayAfter(lLatencyDelayAfter)
177 , m_bIsBlocking(bIsBlocking)
181 OTSocket::Mutex::Mutex()
182 : m_pMutex(new std::mutex)
186 OTSocket::Mutex::~Mutex()
188 if (
nullptr != m_pMutex)
delete m_pMutex;
192 std::mutex* OTSocket::Mutex::Get()
199 return m_Mutex.Get();
227 if (
nullptr == pSettings) {
int64_t m_lLatencyDelayAfter
OTString m_strConnectPath
const int64_t m_lLatencyReceiveMs
int32_t m_nLatencyReceiveNoTries
int32_t m_nLatencySendNoTries
const int64_t m_lLatencySendMs
EXPORT bool HasContext() const
OTString m_strBindingPath
EXPORT const OTString & GetBindingPath() const
const int32_t m_nLatencySendNoTries
#define KEY_LATENCY_DELAY_AFTER
#define KEY_LATENCY_SEND_NO_TRIES
EXPORT std::mutex * GetMutex()
const int64_t m_lLatencyDelayAfter
EXPORT bool Init(const Defaults &defaults)
int64_t m_lLatencyReceiveMs
#define KEY_LATENCY_RECEIVE_NO_TRIES
EXPORT bool IsConnected() const
EXPORT Defaults(int64_t lLatencySendMs, int32_t nLatencySendNoTries, int64_t lLatencyReceiveMs, int32_t nLatencyReceiveNoTries, int64_t lLatencyDelayAfter, bool bIsBlocking)
EXPORT bool CheckSet_long(const OTString &strSection, const OTString &strKey, const int64_t &lDefault, int64_t &out_lResult, bool &out_bIsNew, const OTString &strComment="")
#define KEY_LATENCY_RECEIVE_MS
EXPORT bool IsInitialized() const
const int32_t m_nLatencyReceiveNoTries
EXPORT bool IsListening() const
EXPORT const OTString & GetConnectPath() const
#define KEY_LATENCY_SEND_MS
EXPORT bool CheckSet_bool(const OTString &strSection, const OTString &strKey, const bool &bDefault, bool &out_bResult, bool &out_bIsNew, const OTString &strComment="")