StormByte-Network 4.0.0
C++26 networking module of the StormByte suite
Loading...
Searching...
No Matches
StormByte::Network::HTTP::Options Struct Reference

Scalar request limits. More...

#include <StormByte/network/http/client.hxx>

Collaboration diagram for StormByte::Network::HTTP::Options:

Public Member Functions

 Options () noexcept=default
 Construct default scalar limits without allocation.
 Options (const Options &other) noexcept=default
 Copy limits and the synchronously borrowed cancellation pointer.
 Options (Options &&other) noexcept=default
 Copy scalar controls; the source remains valid.
 ~Options () noexcept=default
 Destroy scalar controls without releasing borrowed cancellation.
Options & operator= (const Options &other) noexcept=default
 Copy scalar controls.
Options & operator= (Options &&other) noexcept=default
 Copy scalar controls; the source remains valid.

Public Attributes

Protocol protocol {Protocol::Automatic}
 Protocol policy.
std::chrono::milliseconds timeout {30000}
 One total DNS-to-body deadline.
const Safe::Atomic< bool > * cancellation {nullptr}
 Borrowed until Execute returns.
ByteSize header_bytes {65536}
 Aggregate decoded headers, status and trailer bytes.
Size header_fields {256}
 Aggregate field count.
Receiver * receiver {nullptr}
 Borrowed until Execute returns; streams the final body.
ByteSize body_bytes {16 * 1024 * 1024}
 Maximum buffered or streamed body in either direction.
ByteSize wire_bytes {32 * 1024 * 1024}
 Maximum incoming wire plaintext.
ByteSize http2_bytes {1024 * 1024}
 Maximum live native HTTP/2 session allocation.
ByteSize url_bytes {8192}
 Maximum URL bytes.
Size informational_responses {16}
 Maximum interim responses.

Detailed Description

Scalar request limits.

All bounds include informational responses and trailers; wire_bytes counts received HTTP plaintext, including framing. Cancellation is synchronously borrowed, checked during every phase, and wins over timeout. Timeout must be positive and at most 24 hours.

Constructor & Destructor Documentation

◆ Options() [1/3]

StormByte::Network::HTTP::Options::Options ( )
defaultnoexcept

Construct default scalar limits without allocation.

◆ Options() [2/3]

StormByte::Network::HTTP::Options::Options ( const Options & other)
defaultnoexcept

Copy limits and the synchronously borrowed cancellation pointer.

Parameters
otherSource options.

◆ Options() [3/3]

StormByte::Network::HTTP::Options::Options ( Options && other)
defaultnoexcept

Copy scalar controls; the source remains valid.

Parameters
otherSource options.

◆ ~Options()

StormByte::Network::HTTP::Options::~Options ( )
defaultnoexcept

Destroy scalar controls without releasing borrowed cancellation.

Member Function Documentation

◆ operator=() [1/2]

Options & StormByte::Network::HTTP::Options::operator= ( const Options & other)
defaultnoexcept

Copy scalar controls.

Parameters
otherSource options.
Returns
This options value.

◆ operator=() [2/2]

Options & StormByte::Network::HTTP::Options::operator= ( Options && other)
defaultnoexcept

Copy scalar controls; the source remains valid.

Parameters
otherSource options.
Returns
This options value.

Member Data Documentation

◆ body_bytes

ByteSize StormByte::Network::HTTP::Options::body_bytes {16 * 1024 * 1024}

Maximum buffered or streamed body in either direction.

◆ cancellation

const Safe::Atomic<bool>* StormByte::Network::HTTP::Options::cancellation {nullptr}

Borrowed until Execute returns.

◆ header_bytes

ByteSize StormByte::Network::HTTP::Options::header_bytes {65536}

Aggregate decoded headers, status and trailer bytes.

◆ header_fields

Size StormByte::Network::HTTP::Options::header_fields {256}

Aggregate field count.

◆ http2_bytes

ByteSize StormByte::Network::HTTP::Options::http2_bytes {1024 * 1024}

Maximum live native HTTP/2 session allocation.

◆ informational_responses

Size StormByte::Network::HTTP::Options::informational_responses {16}

Maximum interim responses.

◆ protocol

Protocol StormByte::Network::HTTP::Options::protocol {Protocol::Automatic}

Protocol policy.

◆ receiver

Receiver* StormByte::Network::HTTP::Options::receiver {nullptr}

Borrowed until Execute returns; streams the final body.

◆ timeout

std::chrono::milliseconds StormByte::Network::HTTP::Options::timeout {30000}

One total DNS-to-body deadline.

◆ url_bytes

ByteSize StormByte::Network::HTTP::Options::url_bytes {8192}

Maximum URL bytes.

◆ wire_bytes

ByteSize StormByte::Network::HTTP::Options::wire_bytes {32 * 1024 * 1024}

Maximum incoming wire plaintext.


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