Skip to content

Commit bcab257

Browse files
committed
Rename HTTPServerConfiguration to NIOHTTPServerConfiguration
1 parent cad5ca2 commit bcab257

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

Sources/HTTPServer/NIOHTTPServer.swift

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public import X509
4040
/// ## Usage
4141
///
4242
/// ```swift
43-
/// let configuration = HTTPServerConfiguration(
43+
/// let configuration = NIOHTTPServerConfiguration(
4444
/// bindTarget: .hostAndPort(host: "localhost", port: 8080),
4545
/// tlsConfiguration: .insecure()
4646
/// )
@@ -81,7 +81,7 @@ public struct NIOHTTPServer: HTTPServerProtocol {
8181
public typealias ResponseWriter = HTTPResponseConcludingAsyncWriter
8282

8383
private let logger: Logger
84-
private let configuration: HTTPServerConfiguration
84+
private let configuration: NIOHTTPServerConfiguration
8585

8686
var listeningAddressState: NIOLockedValueBox<State>
8787

@@ -101,8 +101,8 @@ public struct NIOHTTPServer: HTTPServerProtocol {
101101
}
102102

103103
/// The peer's validated certificate chain. This returns `nil` if a
104-
/// ``HTTPServerConfiguration/TransportSecurity/CustomCertificateVerificationCallback`` was not set in
105-
/// the ``HTTPServerConfiguration/TransportSecurity`` property of the server configuration, or if the peer did
104+
/// ``NIOHTTPServerConfiguration/TransportSecurity/CustomCertificateVerificationCallback`` was not set in the
105+
/// ``NIOHTTPServerConfiguration/TransportSecurity`` property of the server configuration, or if the peer did
106106
/// not authenticate with certificates.
107107
public var peerCertificateChain: X509.ValidatedCertificateChain? {
108108
get async throws {
@@ -120,7 +120,7 @@ public struct NIOHTTPServer: HTTPServerProtocol {
120120
/// - configuration: The server configuration including bind target and TLS settings.
121121
public init(
122122
logger: Logger,
123-
configuration: HTTPServerConfiguration,
123+
configuration: NIOHTTPServerConfiguration,
124124
) {
125125
self.logger = logger
126126
self.configuration = configuration
@@ -285,7 +285,7 @@ public struct NIOHTTPServer: HTTPServerProtocol {
285285
}
286286

287287
private func serveInsecureHTTP1_1(
288-
bindTarget: HTTPServerConfiguration.BindTarget,
288+
bindTarget: NIOHTTPServerConfiguration.BindTarget,
289289
handler: some HTTPServerRequestHandler<RequestReader, ResponseWriter>,
290290
asyncChannelConfiguration: NIOAsyncChannel<HTTPRequestPart, HTTPResponsePart>.Configuration
291291
) async throws {
@@ -321,12 +321,12 @@ public struct NIOHTTPServer: HTTPServerProtocol {
321321
}
322322

323323
private func serveSecureUpgrade(
324-
bindTarget: HTTPServerConfiguration.BindTarget,
324+
bindTarget: NIOHTTPServerConfiguration.BindTarget,
325325
tlsConfiguration: TLSConfiguration,
326326
handler: some HTTPServerRequestHandler<RequestReader, ResponseWriter>,
327327
asyncChannelConfiguration: NIOAsyncChannel<HTTPRequestPart, HTTPResponsePart>.Configuration,
328328
http2Configuration: NIOHTTP2Handler.Configuration,
329-
verificationCallback: HTTPServerConfiguration.TransportSecurity.CustomCertificateVerificationCallback? = nil
329+
verificationCallback: NIOHTTPServerConfiguration.TransportSecurity.CustomCertificateVerificationCallback? = nil
330330
) async throws {
331331
switch bindTarget.backing {
332332
case .hostAndPort(let host, let port):
@@ -496,7 +496,7 @@ public struct NIOHTTPServer: HTTPServerProtocol {
496496
extension NIOHTTPServer {
497497
fileprivate func makeSSLServerHandler(
498498
_ tlsConfiguration: TLSConfiguration,
499-
_ customVerificationCallback: HTTPServerConfiguration.TransportSecurity.CustomCertificateVerificationCallback?
499+
_ customVerificationCallback: NIOHTTPServerConfiguration.TransportSecurity.CustomCertificateVerificationCallback?
500500
) throws -> NIOSSLServerHandler {
501501
if let customVerificationCallback {
502502
return try NIOSSLServerHandler(
@@ -513,7 +513,7 @@ extension NIOHTTPServer {
513513

514514
@available(macOS 26.0, iOS 26.0, watchOS 26.0, tvOS 26.0, visionOS 26.0, *)
515515
extension NIOHTTP2Handler.Configuration {
516-
init(httpServerHTTP2Configuration http2Config: HTTPServerConfiguration.HTTP2) {
516+
init(httpServerHTTP2Configuration http2Config: NIOHTTPServerConfiguration.HTTP2) {
517517
let clampedTargetWindowSize = Self.clampTargetWindowSize(http2Config.targetWindowSize)
518518
let clampedMaxFrameSize = Self.clampMaxFrameSize(http2Config.maxFrameSize)
519519

Sources/HTTPServer/HTTPServerConfiguration.swift renamed to Sources/HTTPServer/NIOHTTPServerConfiguration.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ public import NIOCore
1616
public import NIOSSL
1717
public import X509
1818

19-
/// Configuration settings for the HTTP server.
19+
/// Configuration settings for ``NIOHTTPServer``.
2020
///
2121
/// This structure contains all the necessary configuration options for setting up
22-
/// and running an HTTP server, including network binding and TLS settings.
22+
/// and running ``NIOHTTPServer``, including network binding and TLS settings.
2323
@available(macOS 26.0, iOS 26.0, watchOS 26.0, tvOS 26.0, visionOS 26.0, *)
24-
public struct HTTPServerConfiguration: Sendable {
24+
public struct NIOHTTPServerConfiguration: Sendable {
2525
/// Specifies where the server should bind and listen for incoming connections.
2626
///
2727
/// Currently supports binding to a specific host and port combination.

0 commit comments

Comments
 (0)