Marmos
v juptune
v asn1
v lang
v ast
v Classes
v Enums
v ir
v parser
v Enums
v Structs
v core
v crypto
v keyexchange
v memory
v data
v alphabet
v buffer
v json
v builder
v parser
v Enums
v Structs
v serialise
v Structs
v Templates
v pem
v Enums
v Structs

Structs Http1Config

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
module juptune.http.v1;

struct Http1Config
{
    /++ FUNCTIONS ++/
    
    ///
    Http1Config withMaxReadAttempts(ulong v);
    ///
    Http1Config withReadTimeout(Duration v);
    ///
    Http1Config withWriteTimeout(Duration v);
    
    /++ VARIABLES ++/
    
    /// The maximum number of times the reader will attempt to read data from the socket before giving up and returning an error (in certain circumstances). 
    ulong maxReadAttempts;
    /// The default timeout for reading data 
    Duration readTimeout;
    /// The default timeout for writing data 
    Duration writeTimeout;
}

Documentation

Configuration for the Http1Reader and Http1Writer.

The main reason the config is combined is for simplicity, as the reader and writer are intended to be used together, and thus it makes sense to have a single config struct.

This is especially apparent for higher level APIs that may not display the distinction between the reader and writer, and thus would benefit from a unified configuration object.

Functions

Name Description
withMaxReadAttempts
withReadTimeout
withWriteTimeout

Variables

Name Description
maxReadAttempts

The maximum number of times the reader will attempt to read data from the socket before giving up and returning an error (in certain circumstances).

readTimeout

The default timeout for reading data

writeTimeout

The default timeout for writing data