Skip to content

Structure

HTTPServer.Configuration

Engine server config struct.
struct Configuration

Overview

let serverConfig = HTTPServerConfig.default(port: 8123)
services.register(serverConfig)

Topics

Structures

Initializers

Instance Properties

  • address
    Address 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.
  • backlog
    Listen backlog.
  • connectionsPerServerTick
    The number of incoming TCP connections to accept per “tick” (i.e. each time through the server’s event loop).
  • customCertificateVerifyCallback
    An optional callback that will be called instead of using swift-nio-ssl’s regular certificate verification logic. This is the same as NIOSSLCustomVerificationCallback but just marked as Sendable
  • customCertificateVerifyCallbackWithMetadata
    An optional callback that will be called instead of using swift-nio-ssl’s regular certificate verification logic. This is the same as NIOSSLCustomVerificationCallbackWithMetadata but just marked as Sendable.
  • hostname
    Host name the server will bind to.
  • idleTimeout
    When set, inbound connections that have been idle for this duration will be closed. Default: nil (disabled).
  • logger
    Any uncaught server or responder errors will go here.
  • port
    Port the server will bind to.
  • reportMetrics
    When true, report http metrics through swift-metrics
  • requestDecompression
    Request decompression configuration.
  • responseCompression
    Response compression configuration.
  • reuseAddress
    When true, can prevent errors re-binding to a socket after successive server restarts.
  • serverName
    If set, this name will be serialized as the Server header in outgoing responses.
  • shutdownTimeout
    A time limit to complete a graceful shutdown
  • supportPipelining
    When true, HTTP server will support pipelined requests.
  • supportVersions
  • tcpNoDelay
    When true, OS will attempt to minimize TCP packet delay.
  • tlsConfiguration

Type Aliases

Type Properties

Relationships

Conforms To

  • Swift.Sendable
  • Swift.SendableMetatype