Loading...
Searching...
No Matches
websocketpp::config::minimal_server Struct Reference

Server config with minimal dependencies. More...

`#include <minimal_server.hpp>`

## Classes

struct | transport_config
struct | permessage_deflate_config
| Extension specific settings: More...

## Public Types

typedef minimal_server | type
typedef websocketpp::concurrency::none | concurrency_type
typedef http::parser::request | request_type
typedef http::parser::response | response_type
typedef message_buffer::message< message_buffer::alloc::con_msg_manager > | message_type
typedef message_buffer::alloc::con_msg_manager< message_type > | con_msg_manager_type
typedef message_buffer::alloc::endpoint_msg_manager< con_msg_manager_type > | endpoint_msg_manager_type
typedef websocketpp::log::stub | elog_type
| Logging policies.
typedef websocketpp::log::stub | alog_type
typedef websocketpp::random::none::int_generator< uint32_t > | rng_type
| RNG policies.
typedef websocketpp::transport::stub::endpoint< transport_config > | transport_type
| Transport Endpoint Component.
typedef websocketpp::endpoint_base | endpoint_base
| User overridable Endpoint base class.
typedef websocketpp::connection_base | connection_base
| User overridable Connection base class.
typedef websocketpp::extensions::permessage_deflate::disabled< permessage_deflate_config > | permessage_deflate_type

## Static Public Attributes

static bool const | enable_multithreading = true
static const long | timeout_open_handshake = 5000
| Default timer values (in ms).
static const long | timeout_close_handshake = 5000
| Length of time before a closing handshake is aborted.
static const long | timeout_pong = 5000
| Length of time to wait for a pong after a ping.
static const int | client_version = 13
| WebSocket Protocol version to use as a client.
static const websocketpp::log::level | elog_level
| Default static error logging channels.
static const websocketpp::log::level | alog_level
| Default static access logging channels.
static const size_t | connection_read_buffer_size = 16384
static const bool | drop_on_protocol_error = false
| Drop connections immediately on protocol error.
static const bool | silent_close = false
| Suppresses the return of detailed connection close information.
static const size_t | max_message_size = 32000000
| Default maximum message size.
static const size_t | max_http_body_size = 32000000
| Default maximum http body size.
static const bool | enable_extensions = true
| Global flag for enabling/disabling extensions.

## Detailed Description

Server config with minimal dependencies.

This config strips out as many dependencies as possible. It is suitable for use as a base class for custom configs that want to implement or choose their own policies for components that even the core config includes.

NOTE: this config stubs out enough that it cannot be used directly. You must supply at least a transport policy for a config based on minimal_server to do anything useful.

Present dependency list for minimal_server config:

C++98 STL: <algorithm> <map> <sstream> <string> <vector>

C++11 STL or Boost <memory> <functional> <system_error>

Operating System: <stdint.h> or <boost/cstdint.hpp> <netinet/in.h> or <winsock2.h> (for ntohl.. could potentially bundle this)

Since
  0.4.0-dev

Definition at line 96 of file minimal_server.hpp.

## Member Typedef Documentation

## alog_type

typedef websocketpp::log::stub websocketpp::config::minimal_server::alog_type

Definition at line 116 of file minimal_server.hpp.

## con_msg_manager_type

typedef message_buffer::alloc::con_msg_manager<message_type> websocketpp::config::minimal_server::con_msg_manager_type

Definition at line 110 of file minimal_server.hpp.

## concurrency_type

typedef websocketpp::concurrency::none websocketpp::config::minimal_server::concurrency_type

Definition at line 100 of file minimal_server.hpp.

## connection_base

typedef websocketpp::connection_base websocketpp::config::minimal_server::connection_base

User overridable Connection base class.

Definition at line 173 of file minimal_server.hpp.

## elog_type

typedef websocketpp::log::stub websocketpp::config::minimal_server::elog_type

Logging policies.

Definition at line 115 of file minimal_server.hpp.

## endpoint_base

typedef websocketpp::endpoint_base websocketpp::config::minimal_server::endpoint_base

User overridable Endpoint base class.

Definition at line 171 of file minimal_server.hpp.

## endpoint_msg_manager_type

typedef message_buffer::alloc::endpoint_msg_manager<con_msg_manager_type> websocketpp::config::minimal_server::endpoint_msg_manager_type

Definition at line 112 of file minimal_server.hpp.

## message_type

typedef message_buffer::message<message_buffer::alloc::con_msg_manager> websocketpp::config::minimal_server::message_type

Definition at line 108 of file minimal_server.hpp.

## permessage_deflate_type

typedef websocketpp::extensions::permessage_deflate::disabled<permessage_deflate_config> websocketpp::config::minimal_server::permessage_deflate_type

Definition at line 291 of file minimal_server.hpp.

## request_type

typedef http::parser::request websocketpp::config::minimal_server::request_type

Definition at line 103 of file minimal_server.hpp.

## response_type

typedef http::parser::response websocketpp::config::minimal_server::response_type

Definition at line 104 of file minimal_server.hpp.

## rng_type

typedef websocketpp::random::none::int_generator<uint32_t> websocketpp::config::minimal_server::rng_type

RNG policies.

Definition at line 119 of file minimal_server.hpp.

## transport_type

typedef websocketpp::transport::stub::endpoint<transport_config> websocketpp::config::minimal_server::transport_type

Transport Endpoint Component.

Definition at line 168 of file minimal_server.hpp.

## type

typedef minimal_server websocketpp::config::minimal_server::type

Definition at line 97 of file minimal_server.hpp.

## Member Data Documentation

## alog_level

const websocketpp::log::level websocketpp::config::minimal_server::alog_level

static

Initial value:
=
websocketpp::log::alevel::none
websocketpp::log::alevel::none
static level const none
Special aggregate value representing "no levels".
Definition levels.hpp:114

Default static access logging channels.

Which access logging channels to enable at compile time. Channels not enabled here will be unable to be selected by programs using the library. This option gives an optimizing compiler the ability to remove entirely code to test whether or not to print out log messages on a certain channel

Default is all except for development/debug level access messages

Definition at line 215 of file minimal_server.hpp.

## client_version

const int websocketpp::config::minimal_server::client_version = 13

static

WebSocket Protocol version to use as a client.

What version of the WebSocket Protocol to use for outgoing client connections. Setting this to a value other than 13 (RFC6455) is not recommended.

Definition at line 190 of file minimal_server.hpp.

## connection_read_buffer_size

const size_t websocketpp::config::minimal_server::connection_read_buffer_size = 16384

static

Definition at line 219 of file minimal_server.hpp.

## drop_on_protocol_error

const bool websocketpp::config::minimal_server::drop_on_protocol_error = false

static

Drop connections immediately on protocol error.

Drop connections on protocol error rather than sending a close frame. Off by default. This may result in legit messages near the error being dropped as well. It may free up resources otherwise spent dealing with misbehaving clients.

Definition at line 228 of file minimal_server.hpp.

## elog_level

const websocketpp::log::level websocketpp::config::minimal_server::elog_level

static

Initial value:
=
websocketpp::log::elevel::none
websocketpp::log::elevel::none
static level const none
Special aggregate value representing "no levels".
Definition levels.hpp:61

Default static error logging channels.

Which error logging channels to enable at compile time. Channels not enabled here will be unable to be selected by programs using the library. This option gives an optimizing compiler the ability to remove entirely code to test whether or not to print out log messages on a certain channel

Default is all except for development/debug level errors

Definition at line 202 of file minimal_server.hpp.

## enable_extensions

const bool websocketpp::config::minimal_server::enable_extensions = true

static

Global flag for enabling/disabling extensions.

Definition at line 270 of file minimal_server.hpp.

## enable_multithreading

bool const websocketpp::config::minimal_server::enable_multithreading = true

static

Controls compile time enabling/disabling of thread syncronization code Disabling can provide a minor performance improvement to single threaded applications

Definition at line 124 of file minimal_server.hpp.

## max_http_body_size

const size_t websocketpp::config::minimal_server::max_http_body_size = 32000000

static

Default maximum http body size.

Default value for the http parser's maximum body size. Maximum body size determines the point at which the library will abort reading an HTTP connection with the 413/request entity too large error.

The default is 32MB

Since
  0.5.0

Definition at line 267 of file minimal_server.hpp.

## max_message_size

const size_t websocketpp::config::minimal_server::max_message_size = 32000000

static

Default maximum message size.

Default value for the processor's maximum message size. Maximum message size determines the point at which the library will fail a connection with the message_too_big protocol error.

The default is 32MB

Since
  0.4.0-alpha1

Definition at line 255 of file minimal_server.hpp.

## silent_close

const bool websocketpp::config::minimal_server::silent_close = false

static

Suppresses the return of detailed connection close information.

Silence close suppresses the return of detailed connection close information during the closing handshake. This information is useful for debugging and presenting useful errors to end users but may be undesirable for security reasons in some production environments. Close reasons could be used by an attacker to confirm that the endpoint is out of resources or be used to identify the WebSocket implementation in use.

Note: this will suppress all close codes, including those explicitly sent by local applications.

Definition at line 243 of file minimal_server.hpp.

## timeout_close_handshake

const long websocketpp::config::minimal_server::timeout_close_handshake = 5000

static

Length of time before a closing handshake is aborted.

Definition at line 180 of file minimal_server.hpp.

## timeout_open_handshake

const long websocketpp::config::minimal_server::timeout_open_handshake = 5000

static

Default timer values (in ms).

Length of time before an opening handshake is aborted

Definition at line 178 of file minimal_server.hpp.

## timeout_pong

const long websocketpp::config::minimal_server::timeout_pong = 5000

static

Length of time to wait for a pong after a ping.

Definition at line 182 of file minimal_server.hpp.

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

- websocketpp/config/minimal_server.hpp