backlog
Listen backlog.
var backlog: IntListen backlog.
var backlog: Intimport VaporVapor is a framework for building server applications, APIs and websites in Swift. It provides a safe, performant and scalable foundation for building large complex backends.
struct ConfigurationEngine server config struct.
final class HTTPServer@frozen struct IntA signed integer value type.
init(address: BindAddress, backlog: Int = 256, reuseAddress: Bool = true, tcpNoDelay: Bool = true, responseCompression: ResponseCompressionConfiguration = .disabled, requestDecompression: RequestDecompressionConfiguration = .enabled, supportPipelining: Bool = true, supportVersions: Set<HTTPVersionMajor>? = nil, tlsConfiguration: TLSConfiguration? = nil, serverName: String? = nil, reportMetrics: Bool = true, logger: Logger? = nil, shutdownTimeout: TimeAmount = .seconds(10), customCertificateVerifyCallback: (([NIOSSLCertificate], EventLoopPromise<NIOSSLVerificationResult>) -> Void)? = nil, connectionsPerServerTick: UInt = 256) init(hostname: String = Self.defaultHostname, port: Int = Self.defaultPort, backlog: Int = 256, reuseAddress: Bool = true, tcpNoDelay: Bool = true, responseCompression: ResponseCompressionConfiguration = .disabled, requestDecompression: RequestDecompressionConfiguration = .enabled, supportPipelining: Bool = true, supportVersions: Set<HTTPVersionMajor>? = nil, tlsConfiguration: TLSConfiguration? = nil, serverName: String? = nil, reportMetrics: Bool = true, logger: Logger? = nil, shutdownTimeout: TimeAmount = .seconds(10), customCertificateVerifyCallback: (([NIOSSLCertificate], EventLoopPromise<NIOSSLVerificationResult>) -> Void)? = nil, connectionsPerServerTick: UInt = 256) static let defaultHostname: Stringstatic let defaultPort: Intvar address: BindAddressAddress 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.
var connectionsPerServerTick: UIntThe number of incoming TCP connections to accept per “tick” (i.e. each time through the server’s event loop).
@preconcurrency var customCertificateVerifyCallback: (([NIOSSLCertificate], EventLoopPromise<NIOSSLVerificationResult>) -> Void)?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
var hostname: String { get set }Host name the server will bind to.
var logger: LoggerAny uncaught server or responder errors will go here.
var port: Int { get set }Port the server will bind to.
var reportMetrics: BoolWhen true, report http metrics through swift-metrics
var requestDecompression: RequestDecompressionConfigurationRequest decompression configuration.
var responseCompression: ResponseCompressionConfigurationResponse compression configuration.
var reuseAddress: BoolWhen true, can prevent errors re-binding to a socket after successive server restarts.
var serverName: String?If set, this name will be serialized as the Server header in outgoing responses.
var shutdownTimeout: TimeAmountA time limit to complete a graceful shutdown
var supportPipelining: BoolWhen true, HTTP server will support pipelined requests.
var supportVersions: Set<HTTPVersionMajor>var tcpNoDelay: BoolWhen true, OS will attempt to minimize TCP packet delay.
var tlsConfiguration: TLSConfiguration?struct RequestDecompressionConfigurationSupported HTTP decompression options.
struct ResponseCompressionConfigurationSupported HTTP response compression options.
typealias CompressionConfiguration = ResponseCompressionConfigurationtypealias DecompressionConfiguration = RequestDecompressionConfiguration