SpiecsEngine
 
Loading...
Searching...
No Matches

◆ SetReusePort()

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

Set socket reuse port option.

Parameters
onTrue if want enable such option.
Attention
This option is only available on Linux. use SetReuseAddress instead
Note
windows not support such option. Use SetKeepAlive instead.
windows not support such option. Use SetKeepAlive instead.

Definition at line 162 of file Socket.cpp.

163 {
165
170 //::setsockopt(m_SocketFd, SOL_SOCKET, SO_REUSEPORT, reinterpret_cast<const char*>(&on), sizeof(bool));
171
172 SPICES_CORE_ERROR("Windows not support SO_REUSEPORT, use SetReuseAddress instead.")
173 }
#define SPICES_PROFILE_ZONE