setSocketBuffer(fd, SO_SNDBUF, size);
}
+#ifdef __linux__
static uint32_t raiseSocketBufferToMax(int socket, int optname, const std::string& readMaxFromFile)
{
std::ifstream ifs(readMaxFromFile);
}
return 0;
}
+#endif
-uint32_t raiseSocketReceiveBufferToMax(int socket)
+uint32_t raiseSocketReceiveBufferToMax([[maybe_unused]] int socket)
{
#ifdef __linux__
return raiseSocketBufferToMax(socket, SO_RCVBUF, "/proc/sys/net/core/rmem_max");
#endif
}
-uint32_t raiseSocketSendBufferToMax(int socket)
+uint32_t raiseSocketSendBufferToMax([[maybe_unused]] int socket)
{
#ifdef __linux__
return raiseSocketBufferToMax(socket, SO_SNDBUF, "/proc/sys/net/core/wmem_max");