swift-nio/Sources/NIOCore
Franz Busch 46c0538253
Add NIOAsyncChannel based connect methods to ClientBootstrap (#2437)
* Add NIOAsyncChannel based connect methods to ClientBootstrap

# Motivation
In my previous PR, I added new `bind` methods to `ServerBootstrap` that vend `NIOAsyncChannel` or support an async protocol negotiation. This PR focuses on adding new `connect` methods to `ClientBootstrap` which offer the same functionality.

# Modification
This PR adds new `connect` methods that either vend a `NIOAsyncChannel` or an asynchronous protocol negotiation result. To make this work I had to change the `HappyEyeballs` resolver so that it can return a generic value on resolving. Lastly, I adapted the bootstrap tests to use the new `ClientBootstrap` capabilities which now demonstrate a client/server protocol negotiation dance.

# Result
We can now bootstrap TCP clients with `NIOAsyncChannel`s

* Reduce code duplication

* Create a new set of APIs to tunnel an arbitrary Sendable payload through the inits

* Pass EL to closure

* Fix documentation
2023-06-06 03:36:53 -07:00
..
AsyncChannel Add `AsyncChannel` based `ServerBootstrap.bind()` methods (#2403) 2023-04-26 07:17:07 -07:00
AsyncSequences NIOThrowingAsyncSequenceProducer throws when cancelled (#2415) 2023-04-28 08:21:15 -07:00
Docs.docc Add NIOAsyncChannel based connect methods to ClientBootstrap (#2437) 2023-06-06 03:36:53 -07:00
AddressedEnvelope.swift Replace `NIOSendable` with `Sendable` (#2291) 2022-10-13 15:56:27 +01:00
AsyncAwaitSupport.swift Clean up and regression check the docs. (#2400) 2023-04-11 09:05:22 +01:00
BSDSocketAPI.swift Add support for UDP_GRO (#2385) 2023-03-06 07:12:09 -08:00
ByteBuffer-aux.swift Make all ByteBuffer methods inlinable (#2050) 2022-02-21 03:38:38 -08:00
ByteBuffer-conversions.swift Make all ByteBuffer methods inlinable (#2050) 2022-02-21 03:38:38 -08:00
ByteBuffer-core.swift Make ByteBuffer CustomDebugStringConvertible (#2418) 2023-05-03 03:18:34 -07:00
ByteBuffer-int.swift Replace `NIOSendable` with `Sendable` (#2291) 2022-10-13 15:56:27 +01:00
ByteBuffer-lengthPrefix.swift [ByteBuffer] Reduce ARC traffic when reading (#1978) 2021-10-21 16:57:25 +02:00
ByteBuffer-multi-int.swift ByteBuffer: provide multi read/write int methods (#1987) 2021-11-22 14:58:52 +00:00
ByteBuffer-views.swift Clean up and regression check the docs. (#2400) 2023-04-11 09:05:22 +01:00
Channel.swift Drop Swift 5.5 (#2406) 2023-04-17 08:40:35 +01:00
ChannelHandler.swift Add `AsyncChannel` based `ServerBootstrap.bind()` methods (#2403) 2023-04-26 07:17:07 -07:00
ChannelHandlers.swift Replace `NIOSendable` with `Sendable` (#2291) 2022-10-13 15:56:27 +01:00
ChannelInvoker.swift Use #fileID/#filePath instead of #file (#2306) 2022-11-03 16:43:13 +00:00
ChannelOption.swift Drop Swift 5.5 (#2406) 2023-04-17 08:40:35 +01:00
ChannelPipeline.swift Replace `NIOSendable` with `Sendable` (#2291) 2022-10-13 15:56:27 +01:00
CircularBuffer.swift Replace `NIOSendable` with `Sendable` (#2291) 2022-10-13 15:56:27 +01:00
Codec.swift Replace `NIOSendable` with `Sendable` (#2291) 2022-10-13 15:56:27 +01:00
ConvenienceOptionSupport.swift Replace `NIOSendable` with `Sendable` (#2291) 2022-10-13 15:56:27 +01:00
DeadChannel.swift Move Channel abstractions to NIOCore. (#1920) 2021-08-02 12:39:28 +01:00
DispatchQueue+WithFuture.swift Fixed some typos (#2051) 2022-02-22 01:37:47 -08:00
EventLoop+Deprecated.swift Use #fileID/#filePath instead of #file (#2306) 2022-11-03 16:43:13 +00:00
EventLoop.swift Drop Swift 5.5 (#2406) 2023-04-17 08:40:35 +01:00
EventLoopFuture+Deprecated.swift Use #fileID/#filePath instead of #file (#2306) 2022-11-03 16:43:13 +00:00
EventLoopFuture+WithEventLoop.swift Drop Swift 5.5 (#2406) 2023-04-17 08:40:35 +01:00
EventLoopFuture.swift addition of assertSuccess() and assertFailure() on EventLoopFuture (#2417) 2023-05-04 17:25:18 +01:00
FileDescriptor.swift Move Channel abstractions to NIOCore. (#1920) 2021-08-02 12:39:28 +01:00
FileHandle.swift Replace `NIOSendable` with `Sendable` (#2291) 2022-10-13 15:56:27 +01:00
FileRegion.swift Drop Swift 5.5 (#2406) 2023-04-17 08:40:35 +01:00
IO.swift NIOCore: handle error description on Windows (#2219) 2022-07-07 13:07:34 +01:00
IOData.swift Drop Swift 5.5 (#2406) 2023-04-17 08:40:35 +01:00
IPProtocol.swift Add `NIOBSDSocket.ProtocolSubtype` (#2317) 2022-11-22 06:01:52 -08:00
IntegerBitPacking.swift Extract basic data structures to NIOCore. (#1895) 2021-07-14 09:58:25 +01:00
IntegerTypes.swift Replace `NIOSendable` with `Sendable` (#2291) 2022-10-13 15:56:27 +01:00
Interfaces.swift Remove `#if compiler(>=5.5)` (#2292) 2022-10-13 07:17:46 -07:00
Linux.swift Move MulticastChannel and NIONetworkDevice to NIOCore (#1931) 2021-08-06 13:42:29 +01:00
MarkedCircularBuffer.swift Replace `NIOSendable` with `Sendable` (#2291) 2022-10-13 15:56:27 +01:00
MulticastChannel.swift Move MulticastChannel and NIONetworkDevice to NIOCore (#1931) 2021-08-06 13:42:29 +01:00
NIOAny.swift Drop Swift 5.5 (#2406) 2023-04-17 08:40:35 +01:00
NIOCloseOnErrorHandler.swift Replace `NIOSendable` with `Sendable` (#2291) 2022-10-13 15:56:27 +01:00
NIOLoopBound.swift Clean up and regression check the docs. (#2400) 2023-04-11 09:05:22 +01:00
NIOSendable.swift Drop Swift 5.5 (#2406) 2023-04-17 08:40:35 +01:00
PointerHelpers.swift Extract basic data structures to NIOCore. (#1895) 2021-07-14 09:58:25 +01:00
RecvByteBufferAllocator.swift Drop Swift 5.5 (#2406) 2023-04-17 08:40:35 +01:00
SingleStepByteToMessageDecoder.swift Add unprocessedBytes property on NIOSingleStepByteToMessageProcessor (#2419) 2023-05-03 17:19:13 +01:00
SocketAddresses.swift Replace `NIOSendable` with `Sendable` (#2291) 2022-10-13 15:56:27 +01:00
SocketOptionProvider.swift Drop Swift 5.5 (#2406) 2023-04-17 08:40:35 +01:00
SystemCallHelpers.swift NIOCore: adjust system call helpers for Windows (#2155) 2022-06-07 06:08:32 -07:00
TimeAmount+Duration.swift Move 5.7 beta APIs to NIOCore (#2300) 2022-10-25 15:38:47 +01:00
TypeAssistedChannelHandler.swift Move Channel abstractions to NIOCore. (#1920) 2021-08-02 12:39:28 +01:00
UniversalBootstrapSupport.swift Adopt `Sendable` for Bootstraps (#2209) 2022-07-01 03:45:07 -07:00
Utilities.swift Clean up and regression check the docs. (#2400) 2023-04-11 09:05:22 +01:00