85 int getBoundPort()
const noexcept;
183 std::atomic<int> portNumber { 0 }, handle { -1 };
184 std::atomic<bool> connected {
false };
185 bool isListener =
false;
186 mutable CriticalSection readLock;
188 StreamingSocket (
const String& hostname,
int portNumber,
int handle);
190 JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (StreamingSocket)
253 int getBoundPort()
const noexcept;
349 bool setEnablePortReuse (
bool enabled);
353 std::atomic<int> handle { -1 };
354 bool isBound =
false;
355 String lastBindAddress, lastServerHost;
356 int lastServerPort = -1;
357 void* lastServerAddress =
nullptr;
358 mutable CriticalSection readLock;
360 JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (DatagramSocket)
Holds a resizable array of primitive or copy-by-value objects.
A wrapper for a datagram (UDP) socket.
int getRawSocketHandle() const noexcept
Returns the OS's socket handle that's currently open.
A wrapper for a streaming (TCP) socket.
int getPort() const noexcept
Returns the port number that's currently open.
const String & getHostName() const noexcept
Returns the name of the currently connected host.
bool isConnected() const noexcept
True if the socket is currently connected.
#define JUCE_API
This macro is added to all JUCE public class declarations.