LMMS
Loading...
Searching...
No Matches
juce::SocketHelpers Namespace Reference

Functions

static void initSockets ()
bool isValidPortNumber (int port) noexcept
template<typename Type>
static bool setOption (SocketHandle handle, int mode, int property, Type value) noexcept
template<typename Type>
static bool setOption (SocketHandle handle, int property, Type value) noexcept
static bool resetSocketOptions (SocketHandle handle, bool isDatagram, bool allowBroadcast) noexcept
static void closeSocket (std::atomic< int > &handle, CriticalSection &readLock, bool isListener, int portNumber, std::atomic< bool > &connected) noexcept
static bool bindSocket (SocketHandle handle, int port, const String &address) noexcept
static int getBoundPort (SocketHandle handle) noexcept
static String getConnectedAddress (SocketHandle handle) noexcept
static bool setSocketBlockingState (SocketHandle handle, bool shouldBlock) noexcept
static bool getSocketBlockingState (SocketHandle handle)
static int readSocket (SocketHandle handle, void *destBuffer, int maxBytesToRead, std::atomic< bool > &connected, bool blockUntilSpecifiedAmountHasArrived, CriticalSection &readLock, String *senderIP=nullptr, int *senderPort=nullptr) noexcept
static int waitForReadiness (std::atomic< int > &handle, CriticalSection &readLock, bool forReading, int timeoutMsecs) noexcept
static addrinfo * getAddressInfo (bool isDatagram, const String &hostName, int portNumber)
static bool connectSocket (std::atomic< int > &handle, CriticalSection &readLock, const String &hostName, int portNumber, int timeOutMillisecs) noexcept
static void makeReusable (int handle) noexcept
static bool multicast (int handle, const String &multicastIPAddress, const String &interfaceIPAddress, bool join) noexcept

Function Documentation

◆ bindSocket()

bool juce::SocketHelpers::bindSocket ( SocketHandle handle,
int port,
const String & address )
staticnoexcept

◆ closeSocket()

void juce::SocketHelpers::closeSocket ( std::atomic< int > & handle,
CriticalSection & readLock,
bool isListener,
int portNumber,
std::atomic< bool > & connected )
staticnoexcept

◆ connectSocket()

bool juce::SocketHelpers::connectSocket ( std::atomic< int > & handle,
CriticalSection & readLock,
const String & hostName,
int portNumber,
int timeOutMillisecs )
staticnoexcept

◆ getAddressInfo()

addrinfo * juce::SocketHelpers::getAddressInfo ( bool isDatagram,
const String & hostName,
int portNumber )
static

◆ getBoundPort()

int juce::SocketHelpers::getBoundPort ( SocketHandle handle)
staticnoexcept

◆ getConnectedAddress()

String juce::SocketHelpers::getConnectedAddress ( SocketHandle handle)
staticnoexcept

◆ getSocketBlockingState()

bool juce::SocketHelpers::getSocketBlockingState ( SocketHandle handle)
static

◆ initSockets()

void juce::SocketHelpers::initSockets ( )
static

◆ isValidPortNumber()

bool juce::SocketHelpers::isValidPortNumber ( int port)
inlinenoexcept

◆ makeReusable()

void juce::SocketHelpers::makeReusable ( int handle)
staticnoexcept

◆ multicast()

bool juce::SocketHelpers::multicast ( int handle,
const String & multicastIPAddress,
const String & interfaceIPAddress,
bool join )
staticnoexcept

◆ readSocket()

int juce::SocketHelpers::readSocket ( SocketHandle handle,
void * destBuffer,
int maxBytesToRead,
std::atomic< bool > & connected,
bool blockUntilSpecifiedAmountHasArrived,
CriticalSection & readLock,
String * senderIP = nullptr,
int * senderPort = nullptr )
staticnoexcept

◆ resetSocketOptions()

bool juce::SocketHelpers::resetSocketOptions ( SocketHandle handle,
bool isDatagram,
bool allowBroadcast )
staticnoexcept

◆ setOption() [1/2]

template<typename Type>
bool juce::SocketHelpers::setOption ( SocketHandle handle,
int mode,
int property,
Type value )
staticnoexcept

◆ setOption() [2/2]

template<typename Type>
bool juce::SocketHelpers::setOption ( SocketHandle handle,
int property,
Type value )
staticnoexcept

◆ setSocketBlockingState()

bool juce::SocketHelpers::setSocketBlockingState ( SocketHandle handle,
bool shouldBlock )
staticnoexcept

◆ waitForReadiness()

int juce::SocketHelpers::waitForReadiness ( std::atomic< int > & handle,
CriticalSection & readLock,
bool forReading,
int timeoutMsecs )
staticnoexcept