JUCE v8.0.9
JUCE API
 
Loading...
Searching...
No Matches
juce::SocketOptions Class Reference

Options used for the configuration of the underlying system socket in the StreamingSocket and DatagramSocket classes. More...

#include <juce_Socket.h>

Collaboration diagram for juce::SocketOptions:

Public Member Functions

auto getReceiveBufferSize () const
 
auto getSendBufferSize () const
 
SocketOptions withReceiveBufferSize (int size) const
 The provided size will be used to configure the socket's SO_RCVBUF property.
 
SocketOptions withSendBufferSize (int size) const
 The provided size will be used to configure the socket's SO_SNDBUF property.
 

Private Attributes

std::optional< int > receiveBufferSize
 
std::optional< int > sendBufferSize
 

Detailed Description

Options used for the configuration of the underlying system socket in the StreamingSocket and DatagramSocket classes.

See also
StreamingSocket, DatagramSocket

@tags{Core}

Member Function Documentation

◆ getReceiveBufferSize()

auto juce::SocketOptions::getReceiveBufferSize ( ) const
inline

◆ getSendBufferSize()

auto juce::SocketOptions::getSendBufferSize ( ) const
inline

◆ withReceiveBufferSize()

SocketOptions juce::SocketOptions::withReceiveBufferSize ( int  size) const
inline

The provided size will be used to configure the socket's SO_RCVBUF property.

Increasing the buffer size can reduce the number of lost packets with the DatagramSocket class, if the socket is to receive packets in large bursts.

If this property is not specified, the system default value will be used, but a minimum of 65536 will be ensured.

References juce::withMember().

◆ withSendBufferSize()

SocketOptions juce::SocketOptions::withSendBufferSize ( int  size) const
inline

The provided size will be used to configure the socket's SO_SNDBUF property.

If this property is not specified, the system default value will be used, but a minimum of 65536 will be ensured.

References juce::withMember().

Member Data Documentation

◆ receiveBufferSize

std::optional<int> juce::SocketOptions::receiveBufferSize
private

◆ sendBufferSize

std::optional<int> juce::SocketOptions::sendBufferSize
private

The documentation for this class was generated from the following file: