12345678910111213141516171819202122module 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;
}
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.
| Name | Description |
|---|---|
| withMaxReadAttempts | |
| withReadTimeout | |
| withWriteTimeout |
| 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 |