MCPcopy Create free account
hub / github.com/RomanKubiak/ctrlr / resetSocketOptions

Function resetSocketOptions

JUCE/modules/juce_core/network/juce_Socket.cpp:85–92  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 4

connectSocketFunction · 0.85
StreamingSocketMethod · 0.85
connectMethod · 0.85
DatagramSocketMethod · 0.85

Calls 1

setOptionFunction · 0.85

Tested by

no test coverage detected