swift-nio/Sources
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
..
CNIOAtomics CNIOAtomics: define types for `uintptr_t` and `intptr_t` (#1401) 2020-02-26 17:07:39 +00:00
CNIODarwin Correctly include netinet/in.h (#2315) 2022-11-15 01:58:25 -08:00
CNIOLLHTTP Update HTTP parser to LLHTTP (#2263) 2022-09-13 14:09:57 +01:00
CNIOLinux Allow UDP GRO tests to fail in some circumstances (#2387) 2023-03-13 11:12:06 +00:00
CNIOSHA1 Final language fix (#1732) 2021-01-22 18:39:10 +00:00
CNIOWindows NIO: extract control message handling into a separate protocol (#1678) 2020-10-19 16:18:57 +01:00
NIO Clean up and regression check the docs. (#2400) 2023-04-11 09:05:22 +01:00
NIOAsyncAwaitDemo Remove `#if compiler(>=5.5)` (#2292) 2022-10-13 07:17:46 -07:00
NIOChatClient Move NIO to NIOPosix, make NIO a shell. (#1936) 2021-08-16 16:50:40 +01:00
NIOChatServer Remove `#if compiler(>=5.5)` (#2292) 2022-10-13 07:17:46 -07:00
NIOConcurrencyHelpers Mildly rework the NIOLock storage (#2395) 2023-03-27 16:37:09 +01:00
NIOCore Add NIOAsyncChannel based connect methods to ClientBootstrap (#2437) 2023-06-06 03:36:53 -07:00
NIOCrashTester OnLoopSendable: Sendable containers if on EventLoop (#2370) 2023-02-27 07:11:37 -08:00
NIOEchoClient Allow NIOEchoClient to receive fragmented echo responses. (#2041) 2022-02-07 01:35:16 -08:00
NIOEchoServer Move NIO to NIOPosix, make NIO a shell. (#1936) 2021-08-16 16:50:40 +01:00
NIOEmbedded `Embedded`: `getOption(ChannelOptions.allowRemoteHalfClosure)` should not `fatalError` (#2429) 2023-05-19 09:47:47 -07:00
NIOFoundationCompat Add utilties for reading and writing UUIDs (#2045) 2022-10-31 06:25:28 -07:00
NIOHTTP1 Tolerate sending data after close(mode: .output) (#2421) 2023-05-09 10:52:48 +01:00
NIOHTTP1Client Move NIO to NIOPosix, make NIO a shell. (#1936) 2021-08-16 16:50:40 +01:00
NIOHTTP1Server Move NIO to NIOPosix, make NIO a shell. (#1936) 2021-08-16 16:50:40 +01:00
NIOMulticastChat Adopt `Sendable` for `NIOChatServer` and `MIOMuliticastChat` examples (#2220) 2022-07-06 16:30:24 +01:00
NIOPerformanceTester Throw `CancellationError` instead of returning `nil` during early cancellation. (#2401) 2023-04-11 08:58:01 -07:00
NIOPosix Add NIOAsyncChannel based connect methods to ClientBootstrap (#2437) 2023-06-06 03:36:53 -07:00
NIOTLS Add `AsyncChannel` based `ServerBootstrap.bind()` methods (#2403) 2023-04-26 07:17:07 -07:00
NIOTestUtils Drop Swift 5.5 (#2406) 2023-04-17 08:40:35 +01:00
NIOUDPEchoClient Fix typo in the name of a constant (#2262) 2022-09-04 10:23:54 -07:00
NIOUDPEchoServer Move NIO to NIOPosix, make NIO a shell. (#1936) 2021-08-16 16:50:40 +01:00
NIOWebSocket Drop Swift 5.5 (#2406) 2023-04-17 08:40:35 +01:00
NIOWebSocketClient Move NIO to NIOPosix, make NIO a shell. (#1936) 2021-08-16 16:50:40 +01:00
NIOWebSocketServer Move NIO to NIOPosix, make NIO a shell. (#1936) 2021-08-16 16:50:40 +01:00
_NIOConcurrency Readd module _NIOConcurrency to not break adopters (#1970) 2021-09-23 16:50:53 +02:00
_NIODataStructures Remove `#if compiler(>=5.5)` (#2292) 2022-10-13 07:17:46 -07:00