Structure
ServerConfiguration
struct ServerConfiguration
Topics
Structures
struct HTTP2HTTP/2 specific configuration.struct HTTPVersionAn HTTP protocol version the server can advertise and serve.struct RequestDecompressionConfigurationSupported HTTP decompression options.struct ResponseCompressionConfigurationSupported HTTP response compression options.struct TLSConfigurationTransport-level TLS configuration for the server.
Initializers
Instance Properties
var address: BindAddressvar eTagHashCacheCapacity: UIntHow many file content hashes to keep for advanced ETag comparison.var hostname: String?Host name the server will bind to.var httpVersions: Set<HTTPVersion>The HTTP versions the server accepts. Defaults to HTTP/1.1 only; adding HTTP/2 requires atlsConfiguration.var isTLSEnabled: BoolWhether the server is configured to serve over TLS.var maxDrainBytes: IntHow many bytes of an unread request body the server will drain to keep the connection alive. Past this the drain stops and the connection is closed instead of reading on — a DoS guard. Defaults to 16 KB.var port: Int?Port the server will bind to.var tlsConfiguration: TLSConfiguration?The TLS configuration for the server, ornilto serve over plaintext HTTP.
Relationships
Conforms To
Swift.SendableSwift.SendableMetatype