Set socket keep alive option.
176 {
178
179 if (::setsockopt(
m_SocketFd, SOL_SOCKET, SO_KEEPALIVE,
reinterpret_cast<const char*
>(&on),
sizeof(
bool)) < 0)
180 {
181 std::stringstream ss;
182 ss <<
"Socket::SetKeepAlive error, socket fd: " <<
m_SocketFd <<
" Error: " << WSAGetLastError();
183
184 SPICES_CORE_CRITICAL(ss.str())
185 }
186 }
#define SPICES_PROFILE_ZONE
SOCKET m_SocketFd
This socket fd.