Compare commits

...

2 Commits

Author SHA1 Message Date
Gus Cairo 24ff6590d7 Fix docs 2025-04-25 16:51:35 +01:00
Gus Cairo 1378a1341e Un-deprecate the typealias 2025-04-25 16:51:29 +01:00
4 changed files with 70 additions and 76 deletions

View File

@ -18,12 +18,12 @@ import Dispatch
import Network import Network
@available(OSX 10.14, iOS 12.0, tvOS 12.0, watchOS 6.0, *) @available(OSX 10.14, iOS 12.0, tvOS 12.0, watchOS 6.0, *)
@available(*, deprecated, renamed: "NIOTSDatagramConnectionBootstrap")
public typealias NIOTSDatagramBootstrap = NIOTSDatagramConnectionBootstrap public typealias NIOTSDatagramBootstrap = NIOTSDatagramConnectionBootstrap
/// A `NIOTSDatagramConnectionBootstrap` is an easy way to bootstrap a `NIOTSDatagramConnectionChannel` when creating network clients. /// A ``NIOTSDatagramConnectionBootstrap`` is an easy way to bootstrap a UDP channel when creating network clients.
/// ///
/// Usually you re-use a `NIOTSDatagramConnectionBootstrap` once you set it up, calling `connect` multiple times on the same bootstrap. /// Usually you re-use a ``NIOTSDatagramConnectionBootstrap`` once you set it up, calling `connect` multiple times on the
/// same bootstrap.
/// This way you ensure that the same `EventLoop`s will be shared across all your connections. /// This way you ensure that the same `EventLoop`s will be shared across all your connections.
/// ///
/// Example: /// Example:
@ -41,7 +41,7 @@ public typealias NIOTSDatagramBootstrap = NIOTSDatagramConnectionBootstrap
/// /* the Channel is now connected */ /// /* the Channel is now connected */
/// ``` /// ```
/// ///
/// The connected `NIOTSDatagramConnectionChannel` will operate on `ByteBuffer` as inbound and outbound messages. /// The connected channel will operate on `ByteBuffer` as inbound and outbound messages.
@available(OSX 10.14, iOS 12.0, tvOS 12.0, watchOS 6.0, *) @available(OSX 10.14, iOS 12.0, tvOS 12.0, watchOS 6.0, *)
public final class NIOTSDatagramConnectionBootstrap { public final class NIOTSDatagramConnectionBootstrap {
private let group: EventLoopGroup private let group: EventLoopGroup
@ -77,7 +77,7 @@ public final class NIOTSDatagramConnectionBootstrap {
self.init(group: group as EventLoopGroup) self.init(group: group as EventLoopGroup)
} }
/// Initialize the connected `NIOTSDatagramConnectionChannel` with `initializer`. The most common task in initializer is to add /// Initialize the connected channel with `initializer`. The most common task in initializer is to add
/// `ChannelHandler`s to the `ChannelPipeline`. /// `ChannelHandler`s to the `ChannelPipeline`.
/// ///
/// The connected `Channel` will operate on `ByteBuffer` as inbound and outbound messages. /// The connected `Channel` will operate on `ByteBuffer` as inbound and outbound messages.
@ -90,7 +90,7 @@ public final class NIOTSDatagramConnectionBootstrap {
return self return self
} }
/// Specifies a `ChannelOption` to be applied to the `NIOTSDatagramConnectionChannel`. /// Specifies a `ChannelOption` to be applied to the channel.
/// ///
/// - parameters: /// - parameters:
/// - option: The option to be applied. /// - option: The option to be applied.

View File

@ -17,8 +17,7 @@ import NIOCore
import Dispatch import Dispatch
import Network import Network
/// A ``NIOTSDatagramListenerBootstrap`` is an easy way to bootstrap a `NIOTSDatagramListenerChannel` when /// A ``NIOTSDatagramListenerBootstrap`` is an easy way to bootstrap a listener channel when creating network servers.
/// creating network servers.
/// ///
/// Example: /// Example:
/// ///
@ -47,13 +46,12 @@ import Network
/// try! channel.closeFuture.wait() // wait forever as we never close the Channel /// try! channel.closeFuture.wait() // wait forever as we never close the Channel
/// ``` /// ```
/// ///
/// The `EventLoopFuture` returned by `bind` will fire with a `NIOTSDatagramListenerChannel`. This is the channel that /// The `EventLoopFuture` returned by `bind` will fire with a channel. This is the channel that owns the listening socket. Each
/// owns the listening socket. Each time it accepts a new connection it will fire a `NIOTSDatagramConnectionChannel` through the /// time it accepts a new connection it will fire a new child channel for the new connection through the `ChannelPipeline` via
/// `ChannelPipeline` via `fireChannelRead`: as a result, the `NIOTSDatagramListenerChannel` operates on /// `fireChannelRead`: as a result, the listening channel operates on `Channel`s as inbound messages. Outbound messages are
/// `Channel`s as inbound messages. Outbound messages are not supported on a `NIOTSDatagramConnectionChannel` which means that /// not supported on these listening channels, which means that each write attempt will fail.
/// each write attempt will fail.
/// ///
/// Accepted `NIOTSDatagramConnectionChannel`s operate on `ByteBuffer` as inbound data, and `IOData` as outbound data. /// Accepted channels operate on `ByteBuffer` as inbound data, and `IOData` as outbound data.
@available(OSX 10.14, iOS 12.0, tvOS 12.0, watchOS 6.0, *) @available(OSX 10.14, iOS 12.0, tvOS 12.0, watchOS 6.0, *)
public final class NIOTSDatagramListenerBootstrap { public final class NIOTSDatagramListenerBootstrap {
private let group: EventLoopGroup private let group: EventLoopGroup
@ -83,7 +81,7 @@ public final class NIOTSDatagramListenerBootstrap {
/// > Note: The "real" solution is described in https://github.com/apple/swift-nio/issues/674. /// > Note: The "real" solution is described in https://github.com/apple/swift-nio/issues/674.
/// ///
/// - parameters: /// - parameters:
/// - group: The `EventLoopGroup` to use for the `NIOTSDatagramListenerChannel`. /// - group: The `EventLoopGroup` to use for the listening channel.
public convenience init(group: EventLoopGroup) { public convenience init(group: EventLoopGroup) {
self.init(group: group, childGroup: group) self.init(group: group, childGroup: group)
} }
@ -91,7 +89,7 @@ public final class NIOTSDatagramListenerBootstrap {
/// Create a ``NIOTSDatagramListenerBootstrap`` for the ``NIOTSEventLoopGroup`` `group`. /// Create a ``NIOTSDatagramListenerBootstrap`` for the ``NIOTSEventLoopGroup`` `group`.
/// ///
/// - parameters: /// - parameters:
/// - group: The ``NIOTSEventLoopGroup`` to use for the `NIOTSDatagramListenerChannel`. /// - group: The ``NIOTSEventLoopGroup`` to use for the listening channel.
public convenience init(group: NIOTSEventLoopGroup) { public convenience init(group: NIOTSEventLoopGroup) {
self.init(group: group as EventLoopGroup) self.init(group: group as EventLoopGroup)
} }
@ -107,9 +105,8 @@ public final class NIOTSDatagramListenerBootstrap {
/// > Note: The "real" solution is described in https://github.com/apple/swift-nio/issues/674. /// > Note: The "real" solution is described in https://github.com/apple/swift-nio/issues/674.
/// ///
/// - parameters: /// - parameters:
/// - group: The `EventLoopGroup` to use for the `bind` of the `NIOTSDatagramListenerChannel` /// - group: The `EventLoopGroup` to use for the `bind` of the listening channel and to accept new child channels with.
/// and to accept new `NIOTSDatagramConnectionChannel`s with. /// - childGroup: The `EventLoopGroup` to run the accepted child channels on.
/// - childGroup: The `EventLoopGroup` to run the accepted `NIOTSDatagramConnectionChannel`s on.
public convenience init(group: EventLoopGroup, childGroup: EventLoopGroup) { public convenience init(group: EventLoopGroup, childGroup: EventLoopGroup) {
guard NIOTSBootstraps.isCompatible(group: group) && NIOTSBootstraps.isCompatible(group: childGroup) else { guard NIOTSBootstraps.isCompatible(group: group) && NIOTSBootstraps.isCompatible(group: childGroup) else {
preconditionFailure( preconditionFailure(
@ -126,9 +123,8 @@ public final class NIOTSDatagramListenerBootstrap {
/// on `childGroup`, validating that the `EventLoopGroup`s are compatible with ``NIOTSDatagramListenerBootstrap``. /// on `childGroup`, validating that the `EventLoopGroup`s are compatible with ``NIOTSDatagramListenerBootstrap``.
/// ///
/// - parameters: /// - parameters:
/// - group: The `EventLoopGroup` to use for the `bind` of the `NIOTSDatagramListenerChannel` /// - group: The `EventLoopGroup` to use for the `bind` of the listening channel and to accept new child channels with.
/// and to accept new `NIOTSDatagramConnectionChannel`s with. /// - childGroup: The `EventLoopGroup` to run the accepted child channels on.
/// - childGroup: The `EventLoopGroup` to run the accepted `NIOTSDatagramConnectionChannel`s on.
public init?(validatingGroup group: EventLoopGroup, childGroup: EventLoopGroup? = nil) { public init?(validatingGroup group: EventLoopGroup, childGroup: EventLoopGroup? = nil) {
let childGroup = childGroup ?? group let childGroup = childGroup ?? group
guard NIOTSBootstraps.isCompatible(group: group) && NIOTSBootstraps.isCompatible(group: childGroup) else { guard NIOTSBootstraps.isCompatible(group: group) && NIOTSBootstraps.isCompatible(group: childGroup) else {
@ -142,20 +138,19 @@ public final class NIOTSDatagramListenerBootstrap {
/// Create a ``NIOTSDatagramListenerBootstrap``. /// Create a ``NIOTSDatagramListenerBootstrap``.
/// ///
/// - parameters: /// - parameters:
/// - group: The ``NIOTSEventLoopGroup`` to use for the `bind` of the `NIOTSDatagramListenerChannel` /// - group: The ``NIOTSEventLoopGroup`` to use for the `bind` of the listening channel and to accept new child
/// and to accept new `NIOTSDatagramConnectionChannel`s with. /// channels with.
/// - childGroup: The ``NIOTSEventLoopGroup`` to run the accepted `NIOTSDatagramConnectionChannel`s on. /// - childGroup: The ``NIOTSEventLoopGroup`` to run the accepted child channels on.
public convenience init(group: NIOTSEventLoopGroup, childGroup: NIOTSEventLoopGroup) { public convenience init(group: NIOTSEventLoopGroup, childGroup: NIOTSEventLoopGroup) {
self.init(group: group as EventLoopGroup, childGroup: childGroup as EventLoopGroup) self.init(group: group as EventLoopGroup, childGroup: childGroup as EventLoopGroup)
} }
/// Initialize the `NIOTSDatagramListenerChannel` with `initializer`. The most common task in initializer is to add /// Initialize the listening channel with `initializer`. The most common task in initializer is to add
/// `ChannelHandler`s to the `ChannelPipeline`. /// `ChannelHandler`s to the `ChannelPipeline`.
/// ///
/// The `NIOTSDatagramListenerChannel` uses the accepted `NIOTSDatagramConnectionChannel`s as inbound messages. /// The listening channel uses the accepted child channels as inbound messages.
/// ///
/// > Note: To set the initializer for the accepted `NIOTSDatagramConnectionChannel`s, look at /// > Note: To set the initializer for the accepted child channels, look at ``childChannelInitializer(_:)``.
/// ``childChannelInitializer(_:)``.
/// ///
/// - parameters: /// - parameters:
/// - initializer: A closure that initializes the provided `Channel`. /// - initializer: A closure that initializes the provided `Channel`.
@ -166,7 +161,7 @@ public final class NIOTSDatagramListenerBootstrap {
return self return self
} }
/// Initialize the accepted `NIOTSDatagramConnectionChannel`s with `initializer`. The most common task in initializer is to add /// Initialize the accepted child channels with `initializer`. The most common task in initializer is to add
/// `ChannelHandler`s to the `ChannelPipeline`. Note that if the `initializer` fails then the error will be /// `ChannelHandler`s to the `ChannelPipeline`. Note that if the `initializer` fails then the error will be
/// fired in the *parent* channel. /// fired in the *parent* channel.
/// ///
@ -180,9 +175,9 @@ public final class NIOTSDatagramListenerBootstrap {
return self return self
} }
/// Specifies a `ChannelOption` to be applied to the `NIOTSDatagramListenerChannel`. /// Specifies a `ChannelOption` to be applied to the listening channel.
/// ///
/// > Note: To specify options for the accepted `NIOTSDatagramConnectionChannel`s, look at ``childChannelOption(_:value:)``. /// > Note: To specify options for the accepted child channels, look at ``childChannelOption(_:value:)``.
/// ///
/// - parameters: /// - parameters:
/// - option: The option to be applied. /// - option: The option to be applied.
@ -192,7 +187,7 @@ public final class NIOTSDatagramListenerBootstrap {
return self return self
} }
/// Specifies a `ChannelOption` to be applied to the accepted `NIOTSDatagramConnectionChannel`s. /// Specifies a `ChannelOption` to be applied to the accepted child channels.
/// ///
/// - parameters: /// - parameters:
/// - option: The option to be applied. /// - option: The option to be applied.
@ -269,7 +264,7 @@ public final class NIOTSDatagramListenerBootstrap {
return self return self
} }
/// Bind the `NIOTSDatagramListenerChannel` to `host` and `port`. /// Bind the listening channel to `host` and `port`.
/// ///
/// - parameters: /// - parameters:
/// - host: The host to bind on. /// - host: The host to bind on.
@ -293,7 +288,7 @@ public final class NIOTSDatagramListenerBootstrap {
} }
} }
/// Bind the `NIOTSDatagramListenerChannel` to `address`. /// Bind the listening channel to `address`.
/// ///
/// - parameters: /// - parameters:
/// - address: The `SocketAddress` to bind on. /// - address: The `SocketAddress` to bind on.
@ -303,7 +298,7 @@ public final class NIOTSDatagramListenerBootstrap {
} }
} }
/// Bind the `NIOTSDatagramListenerChannel` to a UNIX Domain Socket. /// Bind the listening channel to a UNIX Domain Socket.
/// ///
/// - parameters: /// - parameters:
/// - unixDomainSocketPath: The _Unix domain socket_ path to bind to. `unixDomainSocketPath` must not exist, it will be created by the system. /// - unixDomainSocketPath: The _Unix domain socket_ path to bind to. `unixDomainSocketPath` must not exist, it will be created by the system.
@ -318,7 +313,7 @@ public final class NIOTSDatagramListenerBootstrap {
} }
} }
/// Bind the `NIOTSDatagramListenerChannel` to a given `NWEndpoint`. /// Bind the listening channel to a given `NWEndpoint`.
/// ///
/// - parameters: /// - parameters:
/// - endpoint: The `NWEndpoint` to bind this channel to. /// - endpoint: The `NWEndpoint` to bind this channel to.
@ -328,7 +323,7 @@ public final class NIOTSDatagramListenerBootstrap {
} }
} }
/// Bind the `NIOTSDatagramListenerChannel` to an existing `NWListener`. /// Bind the listening channel to an existing `NWListener`.
/// ///
/// - parameters: /// - parameters:
/// - listener: The NWListener to wrap. /// - listener: The NWListener to wrap.

View File

@ -17,7 +17,7 @@ import NIOCore
import Dispatch import Dispatch
import Network import Network
/// A ``NIOTSConnectionBootstrap`` is an easy way to bootstrap a `NIOTSConnectionChannel` when creating network clients. /// A ``NIOTSConnectionBootstrap`` is an easy way to bootstrap a channel when creating network clients.
/// ///
/// Usually you re-use a ``NIOTSConnectionBootstrap`` once you set it up, calling `connect` multiple times on the same bootstrap. /// Usually you re-use a ``NIOTSConnectionBootstrap`` once you set it up, calling `connect` multiple times on the same bootstrap.
/// This way you ensure that the same `EventLoop`s will be shared across all your connections. /// This way you ensure that the same `EventLoop`s will be shared across all your connections.
@ -37,7 +37,7 @@ import Network
/// /* the Channel is now connected */ /// /* the Channel is now connected */
/// ``` /// ```
/// ///
/// The connected `NIOTSConnectionChannel` will operate on `ByteBuffer` as inbound and on `IOData` as outbound messages. /// The connected channel will operate on `ByteBuffer` as inbound and on `IOData` as outbound messages.
@available(OSX 10.14, iOS 12.0, tvOS 12.0, watchOS 6.0, *) @available(OSX 10.14, iOS 12.0, tvOS 12.0, watchOS 6.0, *)
public final class NIOTSConnectionBootstrap { public final class NIOTSConnectionBootstrap {
private let group: EventLoopGroup private let group: EventLoopGroup
@ -107,7 +107,7 @@ public final class NIOTSConnectionBootstrap {
self._channelInitializer = { channel in channel.eventLoop.makeSucceededVoidFuture() } self._channelInitializer = { channel in channel.eventLoop.makeSucceededVoidFuture() }
} }
/// Initialize the connected `NIOTSConnectionChannel` with `initializer`. The most common task in initializer is to add /// Initialize the connected channel with `initializer`. The most common task in initializer is to add
/// `ChannelHandler`s to the `ChannelPipeline`. /// `ChannelHandler`s to the `ChannelPipeline`.
/// ///
/// The connected `Channel` will operate on `ByteBuffer` as inbound and `IOData` as outbound messages. /// The connected `Channel` will operate on `ByteBuffer` as inbound and `IOData` as outbound messages.
@ -120,7 +120,7 @@ public final class NIOTSConnectionBootstrap {
return self return self
} }
/// Specifies a `ChannelOption` to be applied to the `NIOTSConnectionChannel`. /// Specifies a `ChannelOption` to be applied to the channel.
/// ///
/// - parameters: /// - parameters:
/// - option: The option to be applied. /// - option: The option to be applied.

View File

@ -17,7 +17,7 @@ import NIOCore
import Dispatch import Dispatch
import Network import Network
/// A ``NIOTSListenerBootstrap`` is an easy way to bootstrap a `NIOTSListenerChannel` when creating network servers. /// A ``NIOTSListenerBootstrap`` is an easy way to bootstrap a listener channel when creating network servers.
/// ///
/// Example: /// Example:
/// ///
@ -46,13 +46,12 @@ import Network
/// try! channel.closeFuture.wait() // wait forever as we never close the Channel /// try! channel.closeFuture.wait() // wait forever as we never close the Channel
/// ``` /// ```
/// ///
/// The `EventLoopFuture` returned by `bind` will fire with a `NIOTSListenerChannel`. This is the channel that owns the /// The `EventLoopFuture` returned by `bind` will fire with a channel. This is the channel that owns the listening socket. Each
/// listening socket. Each time it accepts a new connection it will fire a `NIOTSConnectionChannel` through the /// time it accepts a new connection it will fire a new child channel for the new connection through the `ChannelPipeline` via
/// `ChannelPipeline` via `fireChannelRead`: as a result, the `NIOTSListenerChannel` operates on `Channel`s as inbound /// `fireChannelRead`: as a result, the listening channel operates on `Channel`s as inbound messages. Outbound messages are
/// messages. Outbound messages are not supported on a `NIOTSListenerChannel` which means that each write attempt will /// not supported on these listening channels, which means that each write attempt will fail.
/// fail.
/// ///
/// Accepted `NIOTSConnectionChannel`s operate on `ByteBuffer` as inbound data, and `IOData` as outbound data. /// Accepted channels operate on `ByteBuffer` as inbound data, and `IOData` as outbound data.
@available(OSX 10.14, iOS 12.0, tvOS 12.0, watchOS 6.0, *) @available(OSX 10.14, iOS 12.0, tvOS 12.0, watchOS 6.0, *)
public final class NIOTSListenerBootstrap { public final class NIOTSListenerBootstrap {
private let group: EventLoopGroup private let group: EventLoopGroup
@ -82,7 +81,7 @@ public final class NIOTSListenerBootstrap {
/// > Note: The "real" solution is described in https://github.com/apple/swift-nio/issues/674. /// > Note: The "real" solution is described in https://github.com/apple/swift-nio/issues/674.
/// ///
/// - parameters: /// - parameters:
/// - group: The `EventLoopGroup` to use for the `NIOTSListenerChannel`. /// - group: The `EventLoopGroup` to use for the listening channel.
public convenience init(group: EventLoopGroup) { public convenience init(group: EventLoopGroup) {
self.init(group: group, childGroup: group) self.init(group: group, childGroup: group)
} }
@ -90,7 +89,7 @@ public final class NIOTSListenerBootstrap {
/// Create a ``NIOTSListenerBootstrap`` for the ``NIOTSEventLoopGroup`` `group`. /// Create a ``NIOTSListenerBootstrap`` for the ``NIOTSEventLoopGroup`` `group`.
/// ///
/// - parameters: /// - parameters:
/// - group: The ``NIOTSEventLoopGroup`` to use for the `NIOTSListenerChannel`. /// - group: The ``NIOTSEventLoopGroup`` to use for the listening channel.
public convenience init(group: NIOTSEventLoopGroup) { public convenience init(group: NIOTSEventLoopGroup) {
self.init(group: group as EventLoopGroup) self.init(group: group as EventLoopGroup)
} }
@ -106,9 +105,9 @@ public final class NIOTSListenerBootstrap {
/// > Note: The "real" solution is described in https://github.com/apple/swift-nio/issues/674. /// > Note: The "real" solution is described in https://github.com/apple/swift-nio/issues/674.
/// ///
/// - parameters: /// - parameters:
/// - group: The `EventLoopGroup` to use for the `bind` of the `NIOTSListenerChannel` /// - group: The `EventLoopGroup` to use for the `bind` of the listening channel
/// and to accept new `NIOTSConnectionChannel`s with. /// and to accept new child channels with.
/// - childGroup: The `EventLoopGroup` to run the accepted `NIOTSConnectionChannel`s on. /// - childGroup: The `EventLoopGroup` to run the accepted child channels on.
public convenience init(group: EventLoopGroup, childGroup: EventLoopGroup) { public convenience init(group: EventLoopGroup, childGroup: EventLoopGroup) {
guard NIOTSBootstraps.isCompatible(group: group) && NIOTSBootstraps.isCompatible(group: childGroup) else { guard NIOTSBootstraps.isCompatible(group: group) && NIOTSBootstraps.isCompatible(group: childGroup) else {
preconditionFailure( preconditionFailure(
@ -125,9 +124,9 @@ public final class NIOTSListenerBootstrap {
/// validating that the `EventLoopGroup`s are compatible with ``NIOTSListenerBootstrap``. /// validating that the `EventLoopGroup`s are compatible with ``NIOTSListenerBootstrap``.
/// ///
/// - parameters: /// - parameters:
/// - group: The `EventLoopGroup` to use for the `bind` of the `NIOTSListenerChannel` /// - group: The `EventLoopGroup` to use for the `bind` of the listening channel
/// and to accept new `NIOTSConnectionChannel`s with. /// and to accept new child channels with.
/// - childGroup: The `EventLoopGroup` to run the accepted `NIOTSConnectionChannel`s on. /// - childGroup: The `EventLoopGroup` to run the accepted child channels on.
public init?(validatingGroup group: EventLoopGroup, childGroup: EventLoopGroup? = nil) { public init?(validatingGroup group: EventLoopGroup, childGroup: EventLoopGroup? = nil) {
let childGroup = childGroup ?? group let childGroup = childGroup ?? group
guard NIOTSBootstraps.isCompatible(group: group) && NIOTSBootstraps.isCompatible(group: childGroup) else { guard NIOTSBootstraps.isCompatible(group: group) && NIOTSBootstraps.isCompatible(group: childGroup) else {
@ -144,19 +143,19 @@ public final class NIOTSListenerBootstrap {
/// Create a ``NIOTSListenerBootstrap``. /// Create a ``NIOTSListenerBootstrap``.
/// ///
/// - parameters: /// - parameters:
/// - group: The ``NIOTSEventLoopGroup`` to use for the `bind` of the `NIOTSListenerChannel` /// - group: The ``NIOTSEventLoopGroup`` to use for the `bind` of the listening channel
/// and to accept new `NIOTSConnectionChannel`s with. /// and to accept new child channels with.
/// - childGroup: The ``NIOTSEventLoopGroup`` to run the accepted `NIOTSConnectionChannel`s on. /// - childGroup: The ``NIOTSEventLoopGroup`` to run the accepted child channels on.
public convenience init(group: NIOTSEventLoopGroup, childGroup: NIOTSEventLoopGroup) { public convenience init(group: NIOTSEventLoopGroup, childGroup: NIOTSEventLoopGroup) {
self.init(group: group as EventLoopGroup, childGroup: childGroup as EventLoopGroup) self.init(group: group as EventLoopGroup, childGroup: childGroup as EventLoopGroup)
} }
/// Initialize the `NIOTSListenerChannel` with `initializer`. The most common task in initializer is to add /// Initialize the listening channel with `initializer`. The most common task in initializer is to add
/// `ChannelHandler`s to the `ChannelPipeline`. /// `ChannelHandler`s to the `ChannelPipeline`.
/// ///
/// The `NIOTSListenerChannel` uses the accepted `NIOTSConnectionChannel`s as inbound messages. /// The listening channel uses the accepted child channels as inbound messages.
/// ///
/// > Note: To set the initializer for the accepted `NIOTSConnectionChannel`s, look at /// > Note: To set the initializer for the accepted child channels, look at
/// ``childChannelInitializer(_:)``. /// ``childChannelInitializer(_:)``.
/// ///
/// - parameters: /// - parameters:
@ -168,7 +167,7 @@ public final class NIOTSListenerBootstrap {
return self return self
} }
/// Initialize the accepted `NIOTSConnectionChannel`s with `initializer`. The most common task in initializer is to add /// Initialize the accepted child channels with `initializer`. The most common task in initializer is to add
/// `ChannelHandler`s to the `ChannelPipeline`. Note that if the `initializer` fails then the error will be /// `ChannelHandler`s to the `ChannelPipeline`. Note that if the `initializer` fails then the error will be
/// fired in the *parent* channel. /// fired in the *parent* channel.
/// ///
@ -182,9 +181,9 @@ public final class NIOTSListenerBootstrap {
return self return self
} }
/// Specifies a `ChannelOption` to be applied to the `NIOTSListenerChannel`. /// Specifies a `ChannelOption` to be applied to the listening channel.
/// ///
/// > Note: To specify options for the accepted `NIOTSConnectionChannel`s, look at ``childChannelOption(_:value:)``. /// > Note: To specify options for the accepted child channels, look at ``childChannelOption(_:value:)``.
/// ///
/// - parameters: /// - parameters:
/// - option: The option to be applied. /// - option: The option to be applied.
@ -194,7 +193,7 @@ public final class NIOTSListenerBootstrap {
return self return self
} }
/// Specifies a `ChannelOption` to be applied to the accepted `NIOTSConnectionChannel`s. /// Specifies a `ChannelOption` to be applied to the accepted child channels.
/// ///
/// - parameters: /// - parameters:
/// - option: The option to be applied. /// - option: The option to be applied.
@ -281,7 +280,7 @@ public final class NIOTSListenerBootstrap {
self.serverChannelOption(NIOTSChannelOptions.multipathServiceType, value: type) self.serverChannelOption(NIOTSChannelOptions.multipathServiceType, value: type)
} }
/// Bind the `NIOTSListenerChannel` to `host` and `port`. /// Bind the listening channel to `host` and `port`.
/// ///
/// - parameters: /// - parameters:
/// - host: The host to bind on. /// - host: The host to bind on.
@ -305,7 +304,7 @@ public final class NIOTSListenerBootstrap {
} }
} }
/// Bind the `NIOTSListenerChannel` to `address`. /// Bind the listening channel to `address`.
/// ///
/// - parameters: /// - parameters:
/// - address: The `SocketAddress` to bind on. /// - address: The `SocketAddress` to bind on.
@ -315,7 +314,7 @@ public final class NIOTSListenerBootstrap {
} }
} }
/// Bind the `NIOTSListenerChannel` to a UNIX Domain Socket. /// Bind the listening channel to a UNIX Domain Socket.
/// ///
/// - parameters: /// - parameters:
/// - unixDomainSocketPath: The _Unix domain socket_ path to bind to. `unixDomainSocketPath` must not exist, it will be created by the system. /// - unixDomainSocketPath: The _Unix domain socket_ path to bind to. `unixDomainSocketPath` must not exist, it will be created by the system.
@ -330,7 +329,7 @@ public final class NIOTSListenerBootstrap {
} }
} }
/// Bind the `NIOTSListenerChannel` to a given `NWEndpoint`. /// Bind the listening channel to a given `NWEndpoint`.
/// ///
/// - parameters: /// - parameters:
/// - endpoint: The `NWEndpoint` to bind this channel to. /// - endpoint: The `NWEndpoint` to bind this channel to.
@ -340,7 +339,7 @@ public final class NIOTSListenerBootstrap {
} }
} }
/// Bind the `NIOTSListenerChannel` to an existing `NWListener`. /// Bind the listening channel to an existing `NWListener`.
/// ///
/// - parameters: /// - parameters:
/// - listener: The NWListener to wrap. /// - listener: The NWListener to wrap.
@ -441,7 +440,7 @@ public final class NIOTSListenerBootstrap {
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) @available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
extension NIOTSListenerBootstrap { extension NIOTSListenerBootstrap {
/// Bind the `NIOTSListenerChannel` to `host` and `port`. /// Bind the listening channel to `host` and `port`.
/// ///
/// - Parameters: /// - Parameters:
/// - host: The host to bind on. /// - host: The host to bind on.
@ -486,7 +485,7 @@ extension NIOTSListenerBootstrap {
).get() ).get()
} }
/// Bind the `NIOTSListenerChannel` to `address`. /// Bind the listening channel to `address`.
/// ///
/// - Parameters: /// - Parameters:
/// - address: The `SocketAddress` to bind on. /// - address: The `SocketAddress` to bind on.
@ -516,7 +515,7 @@ extension NIOTSListenerBootstrap {
).get() ).get()
} }
/// Bind the `NIOTSListenerChannel` to a given `NWEndpoint`. /// Bind the listening channel to a given `NWEndpoint`.
/// ///
/// - Parameters: /// - Parameters:
/// - endpoint: The `NWEndpoint` to bind this channel to. /// - endpoint: The `NWEndpoint` to bind this channel to.
@ -549,7 +548,7 @@ extension NIOTSListenerBootstrap {
).get() ).get()
} }
/// Bind the `NIOTSListenerChannel` to an existing `NWListener`. /// Bind the listening channel to an existing `NWListener`.
/// ///
/// - Parameters: /// - Parameters:
/// - listener: The NWListener to wrap. /// - listener: The NWListener to wrap.