Instance Propertyvapor 4.106.2Vapor
connectionsPerServerTick
The number of incoming TCP connections to accept per “tick” (i.e. each time through the server’s event loop).
HTTPServer.swift:125var connectionsPerServerTick: UInt
Most users will never need to change this value; its primary use case is to work around benchmarking artifacts where bursts of connections are created within extremely small intervals. See https://forums.swift.org/t/standard-vapor-website-drops-1-5-of-requests-even-at-concurrency-of-100/71583/49 for additional information.
Other members in extension
Types
struct RequestDecompressionConfiguration
Supported HTTP decompression options.
struct ResponseCompressionConfiguration
Supported HTTP response compression options.
Typealiases
Show obsolete interfaces (2)
Hide obsolete interfaces
Type members
init(address: BindAddress, backlog: Int, reuseAddress: Bool, tcpNoDelay: Bool, responseCompression: ResponseCompressionConfiguration, requestDecompression: RequestDecompressionConfiguration, supportPipelining: Bool, supportVersions: Set<HTTPVersionMajor>?, tlsConfiguration: TLSConfiguration?, serverName: String?, reportMetrics: Bool, logger: Logger?, shutdownTimeout: TimeAmount, customCertificateVerifyCallback: (([NIOSSLCertificate], EventLoopPromise<NIOSSLVerificationResult>) -> Void)?, connectionsPerServerTick: UInt
) init(hostname: String, port: Int, backlog: Int, reuseAddress: Bool, tcpNoDelay: Bool, responseCompression: ResponseCompressionConfiguration, requestDecompression: RequestDecompressionConfiguration, supportPipelining: Bool, supportVersions: Set<HTTPVersionMajor>?, tlsConfiguration: TLSConfiguration?, serverName: String?, reportMetrics: Bool, logger: Logger?, shutdownTimeout: TimeAmount, customCertificateVerifyCallback: (([NIOSSLCertificate], EventLoopPromise<NIOSSLVerificationResult>) -> Void)?, connectionsPerServerTick: UInt
) static let defaultHostname: String
static let defaultPort: Int
Instance members
var address: BindAddress
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.
var backlog: Int
Listen backlog.
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 asSendable
var hostname: String
Host name the server will bind to.
var logger: Logger
Any uncaught server or responder errors will go here.
var port: Int
Port the server will bind to.
var reportMetrics: Bool
When
true
, report http metrics throughswift-metrics
var requestDecompression: RequestDecompressionConfiguration
Request decompression configuration.
var responseCompression: ResponseCompressionConfiguration
Response compression configuration.
var reuseAddress: Bool
When
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: TimeAmount
A time limit to complete a graceful shutdown
var supportPipelining: Bool
When
true
, HTTP server will support pipelined requests.var supportVersions: Set<HTTPVersionMajor>
var tcpNoDelay: Bool
When
true
, OS will attempt to minimize TCP packet delay.var tlsConfiguration: TLSConfiguration?