SpiecsEngine
 
Loading...
Searching...
No Matches

◆ SetTcpNoDelay()

void Spices::Net::Socket::SetTcpNoDelay ( bool on) const

Set socket Tcp no delay option.

Parameters
onTrue if want enable such option.

Definition at line 149 of file Socket.cpp.

150 {
152
153 if (::setsockopt(m_SocketFd, IPPROTO_TCP, TCP_NODELAY, reinterpret_cast<const char*>(&on), sizeof(bool)) < 0)
154 {
155 std::stringstream ss;
156 ss << "Socket::SetTcpNoDelay error, socket fd: " << m_SocketFd << " Error: " << WSAGetLastError();
157
158 SPICES_CORE_CRITICAL(ss.str())
159 }
160 }
#define SPICES_PROFILE_ZONE
SOCKET m_SocketFd
This socket fd.
Definition Socket.h:142