Structure
HTTPServer.Configuration
Engine server config struct.
struct Configuration
Overview
let serverConfig = HTTPServerConfig.default(port: 8123)
services.register(serverConfig)
Topics
Structures
HTTPServer.Configuration.RequestDecompressionConfigurationSupported HTTP decompression options.HTTPServer.Configuration.ResponseCompressionConfigurationSupported HTTP response compression options.
Initializers
init(address:backlog:reuseAddress:tcpNoDelay:responseCompression:requestDecompression:supportPipelining:supportVersions:tlsConfiguration:serverName:reportMetrics:logger:shutdownTimeout:customCertificateVerifyCallback:connectionsPerServerTick:idleTimeout:)init(address:backlog:reuseAddress:tcpNoDelay:responseCompression:requestDecompression:supportPipelining:supportVersions:tlsConfiguration:serverName:reportMetrics:logger:shutdownTimeout:customCertificateVerifyCallbackWithMetadata:connectionsPerServerTick:idleTimeout:)init(hostname:port:backlog:reuseAddress:tcpNoDelay:responseCompression:requestDecompression:supportPipelining:supportVersions:tlsConfiguration:serverName:reportMetrics:logger:shutdownTimeout:customCertificateVerifyCallback:connectionsPerServerTick:idleTimeout:)init(hostname:port:backlog:reuseAddress:tcpNoDelay:responseCompression:requestDecompression:supportPipelining:supportVersions:tlsConfiguration:serverName:reportMetrics:logger:shutdownTimeout:customCertificateVerifyCallbackWithMetadata:connectionsPerServerTick:idleTimeout:)
Instance Properties
addressAddress the server will bind to. Configuring an address using a hostname with a nil host or port will use the default hostname or port respectively.backlogListen backlog.connectionsPerServerTickThe number of incoming TCP connections to accept per “tick” (i.e. each time through the server’s event loop).customCertificateVerifyCallbackAn optional callback that will be called instead of using swift-nio-ssl’s regular certificate verification logic. This is the same asNIOSSLCustomVerificationCallbackbut just marked asSendablecustomCertificateVerifyCallbackWithMetadataAn optional callback that will be called instead of using swift-nio-ssl’s regular certificate verification logic. This is the same asNIOSSLCustomVerificationCallbackWithMetadatabut just marked asSendable.hostnameHost name the server will bind to.idleTimeoutWhen set, inbound connections that have been idle for this duration will be closed. Default:nil(disabled).loggerAny uncaught server or responder errors will go here.portPort the server will bind to.reportMetricsWhentrue, report http metrics throughswift-metricsrequestDecompressionRequest decompression configuration.responseCompressionResponse compression configuration.reuseAddressWhentrue, can prevent errors re-binding to a socket after successive server restarts.serverNameIf set, this name will be serialized as theServerheader in outgoing responses.shutdownTimeoutA time limit to complete a graceful shutdownsupportPipeliningWhentrue, HTTP server will support pipelined requests.supportVersionstcpNoDelayWhentrue, OS will attempt to minimize TCP packet delay.tlsConfiguration
Type Aliases
HTTPServer.Configuration.CompressionConfigurationHTTPServer.Configuration.DecompressionConfiguration
Type Properties
Relationships
Conforms To
Swift.SendableSwift.SendableMetatype