| 83 | } |
| 84 | |
| 85 | static bool resetSocketOptions (SocketHandle handle, bool isDatagram, bool allowBroadcast) noexcept |
| 86 | { |
| 87 | return handle != invalidSocket |
| 88 | && setOption (handle, SO_RCVBUF, (int) 65536) |
| 89 | && setOption (handle, SO_SNDBUF, (int) 65536) |
| 90 | && (isDatagram ? ((! allowBroadcast) || setOption (handle, SO_BROADCAST, (int) 1)) |
| 91 | : setOption (handle, IPPROTO_TCP, TCP_NODELAY, (int) 1)); |
| 92 | } |
| 93 | |
| 94 | static void closeSocket (std::atomic<int>& handle, CriticalSection& readLock, |
| 95 | bool isListener, int portNumber, std::atomic<bool>& connected) noexcept |
no test coverage detected