Symple module

Server::Options

Configuration options for the Symple server.

Options

#include <icy/symple/server.h>

struct Options

Defined in src/symple/include/icy/symple/server.h:140

Public Attributes

ReturnNameDescription
std::stringhost
uint16_tport
net::TCPSocket::PtrsocketOptional pre-created listen socket (e.g. SSLSocket for HTTPS/WSS).
boolauthenticationRequire token in auth message.
booldynamicRoomsAllow clients to join/leave rooms.
boolenforceOriginEnforce WebSocket Origin checks before accepting browser upgrades.
boolallowSameOriginAllow Origin matching the request Host and originScheme.
std::stringoriginSchemeScheme used for same-origin checks ("http" or "https").
std::vector< std::string >allowedOriginsAdditional exact Origin values to allow.
size_tmaxConnectionsMax WebSocket connections (0 = unlimited)
size_tmaxMessageSizeMax message payload in bytes (64KB default)
doublerateLimitMessages per rate window.
doublerateSecondsRate window in seconds.

host

std::string host = "0.0.0.0"

Defined in src/symple/include/icy/symple/server.h:142


port

uint16_t port = 4500

Defined in src/symple/include/icy/symple/server.h:143


socket

net::TCPSocket::Ptr socket

Type: net::TCPSocket::Ptr

Defined in src/symple/include/icy/symple/server.h:144

Optional pre-created listen socket (e.g. SSLSocket for HTTPS/WSS).


authentication

bool authentication = false

Defined in src/symple/include/icy/symple/server.h:145

Require token in auth message.


dynamicRooms

bool dynamicRooms = true

Defined in src/symple/include/icy/symple/server.h:146

Allow clients to join/leave rooms.


enforceOrigin

bool enforceOrigin = false

Defined in src/symple/include/icy/symple/server.h:147

Enforce WebSocket Origin checks before accepting browser upgrades.


allowSameOrigin

bool allowSameOrigin = true

Defined in src/symple/include/icy/symple/server.h:148

Allow Origin matching the request Host and originScheme.


originScheme

std::string originScheme = "http"

Defined in src/symple/include/icy/symple/server.h:149

Scheme used for same-origin checks ("http" or "https").


allowedOrigins

std::vector< std::string > allowedOrigins

Defined in src/symple/include/icy/symple/server.h:150

Additional exact Origin values to allow.


maxConnections

size_t maxConnections = 1024

Defined in src/symple/include/icy/symple/server.h:153

Max WebSocket connections (0 = unlimited)


maxMessageSize

size_t maxMessageSize = 64 * 1024

Defined in src/symple/include/icy/symple/server.h:154

Max message payload in bytes (64KB default)


rateLimit

double rateLimit = 100.0

Defined in src/symple/include/icy/symple/server.h:155

Messages per rate window.


rateSeconds

double rateSeconds = 10.0

Defined in src/symple/include/icy/symple/server.h:156

Rate window in seconds.