SuaveConfig Type

The core configuration of suave. See also Suave.Web.default_config which you can use to bootstrap the configuration: { default_config with bindings = [ ... ] }

Record fields

Record Field Description

acceptorCount

Full Usage: acceptorCount

Field type: int

Number of independent accept loops (and listening sockets) per binding. 1 (default): single acceptor, historical behaviour. 0: auto. On platforms with kernel SO_REUSEPORT (Linux 3.9+, macOS/BSD), use min(Environment.ProcessorCount, 16) acceptors; on platforms without it (e.g. Windows), fall back to a single acceptor. >1: explicit count. Requires SO_REUSEPORT; falls back to 1 on platforms that don't support it. Multiple acceptors let the kernel load-balance incoming connections across independent accept threads, removing the single-listener accept bottleneck on many-core machines.

Field type: int

bindings

Full Usage: bindings

Field type: HttpBinding list

The bindings for the web server to launch with

Field type: HttpBinding list

bufferSize

Full Usage: bufferSize

Field type: int

buffer size for socket operations

Field type: int

cancellationToken

Full Usage: cancellationToken

Field type: CancellationToken

A cancellation token for the web server. Signalling this token means that the web server shuts down

Field type: CancellationToken

compressedFilesFolder

Full Usage: compressedFilesFolder

Field type: string option

Folder for temporary compressed files

Field type: string option

cookieSerialiser

Full Usage: cookieSerialiser

Field type: CookieSerialiser

The cookie serialiser to use for converting the data you save in cookies from your application into a byte array.

Field type: CookieSerialiser

errorHandler

Full Usage: errorHandler

Field type: ErrorHandler

An error handler to use for handling exceptions that are are thrown from the web parts

Field type: ErrorHandler

filePartSink

Full Usage: filePartSink

Field type: FilePartSink option

Optional sink factory for streaming multipart file parts without a temp file. When None (the default), each file part is buffered to a temporary file on disk, matching the pre-existing behaviour.

Field type: FilePartSink option

healthCheckEnabled

Full Usage: healthCheckEnabled

Field type: bool

Enable background connection health monitoring

Field type: bool

healthCheckIntervalMs

Full Usage: healthCheckIntervalMs

Field type: int

Interval for connection health checks in milliseconds

Field type: int

hideHeader

Full Usage: hideHeader

Field type: bool

Make this true, if you want Suave not to display its server header in every response. Defaults to false.

Field type: bool

homeFolder

Full Usage: homeFolder

Field type: string option

Home or root directory

Field type: string option

listenTimeout

Full Usage: listenTimeout

Field type: TimeSpan

Timeout to wait for the socket bind to finish

Field type: TimeSpan

maxConnectionAgeSeconds

Full Usage: maxConnectionAgeSeconds

Field type: int

Maximum age for an active connection before it's considered stuck (seconds)

Field type: int

maxContentLength

Full Usage: maxContentLength

Field type: int

Maximun upload size in bytes

Field type: int

maxOps

Full Usage: maxOps

Field type: int

max number of concurrent socket operations

Field type: int

mimeTypesMap

Full Usage: mimeTypesMap

Field type: MimeTypesMap

MIME types

Field type: MimeTypesMap

serverKey

Full Usage: serverKey

Field type: byte[]

A server-key to use for cryptographic operations. When generated it should be completely random; you can share this key between load-balanced servers if you want to have them cryptographically verify similarly.

Field type: byte[]

Instance members

Instance member Description

this.withAcceptorCount v

Full Usage: this.withAcceptorCount v

Parameters:
    v : int

Returns: SuaveConfig
v : int
Returns: SuaveConfig

this.withBindings v

Full Usage: this.withBindings v

Parameters:
Returns: SuaveConfig
v : HttpBinding list
Returns: SuaveConfig

this.withBufferSize v

Full Usage: this.withBufferSize v

Parameters:
    v : int

Returns: SuaveConfig
v : int
Returns: SuaveConfig

this.withCancellationToken v

Full Usage: this.withCancellationToken v

Parameters:
Returns: SuaveConfig
v : CancellationToken
Returns: SuaveConfig

this.withCompressedFilesFolder v

Full Usage: this.withCompressedFilesFolder v

Parameters:
    v : string option

Returns: SuaveConfig
v : string option
Returns: SuaveConfig

this.withErrorHandler v

Full Usage: this.withErrorHandler v

Parameters:
Returns: SuaveConfig
v : ErrorHandler
Returns: SuaveConfig

this.withFilePartSink v

Full Usage: this.withFilePartSink v

Parameters:
Returns: SuaveConfig
v : FilePartSink option
Returns: SuaveConfig

this.withHealthCheckEnabled v

Full Usage: this.withHealthCheckEnabled v

Parameters:
    v : bool

Returns: SuaveConfig
v : bool
Returns: SuaveConfig

this.withHealthCheckIntervalMs v

Full Usage: this.withHealthCheckIntervalMs v

Parameters:
    v : int

Returns: SuaveConfig
v : int
Returns: SuaveConfig

this.withHiddenHeader v

Full Usage: this.withHiddenHeader v

Parameters:
    v : bool

Returns: SuaveConfig
v : bool
Returns: SuaveConfig

this.withHomeFolder v

Full Usage: this.withHomeFolder v

Parameters:
    v : string option

Returns: SuaveConfig
v : string option
Returns: SuaveConfig

this.withListenTimeout v

Full Usage: this.withListenTimeout v

Parameters:
Returns: SuaveConfig
v : TimeSpan
Returns: SuaveConfig

this.withMaxConnectionAgeSeconds v

Full Usage: this.withMaxConnectionAgeSeconds v

Parameters:
    v : int

Returns: SuaveConfig
v : int
Returns: SuaveConfig

this.withMaxContentLength v

Full Usage: this.withMaxContentLength v

Parameters:
    v : int

Returns: SuaveConfig
v : int
Returns: SuaveConfig

this.withMaxOps v

Full Usage: this.withMaxOps v

Parameters:
    v : int

Returns: SuaveConfig
v : int
Returns: SuaveConfig

this.withMimeTypesMap v

Full Usage: this.withMimeTypesMap v

Parameters:
Returns: SuaveConfig
v : MimeTypesMap
Returns: SuaveConfig

this.withServerKey v

Full Usage: this.withServerKey v

Parameters:
    v : byte[]

Returns: SuaveConfig
v : byte[]
Returns: SuaveConfig