swift-nio/Tests/NIOPosixTests
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
..
AcceptBackoffHandlerTest.swift Deprecate `NIOAtomics` in favor of `Atomics` (#2204) 2022-07-01 02:31:14 -07:00
AsyncChannelBootstrapTests.swift Add NIOAsyncChannel based connect methods to ClientBootstrap (#2437) 2023-06-06 03:36:53 -07:00
BlockingIOThreadPoolTest.swift Move NIO to NIOPosix, make NIO a shell. (#1936) 2021-08-16 16:50:40 +01:00
BootstrapTest.swift Add `NIOBSDSocket.ProtocolSubtype` (#2317) 2022-11-22 06:01:52 -08:00
ChannelNotificationTest.swift Use #fileID/#filePath instead of #file (#2306) 2022-11-03 16:43:13 +00:00
ChannelPipelineTest.swift Define `Array` element type explicitly to fix nightly CI (#2250) 2022-08-24 17:48:42 +01:00
ChannelTests.swift Pool buffers for ivecs and storage refs in the event loop. (#2358) 2023-02-07 13:48:26 +00:00
CodecTest.swift Use #fileID/#filePath instead of #file (#2306) 2022-11-03 16:43:13 +00:00
ControlMessageTests.swift Use #fileID/#filePath instead of #file (#2306) 2022-11-03 16:43:13 +00:00
DatagramChannelTests.swift Always populate utsname (#2391) 2023-03-14 09:37:10 -07:00
EchoServerClientTest.swift Deprecate `NIOAtomics` in favor of `Atomics` (#2204) 2022-07-01 02:31:14 -07:00
EventLoopFutureTest.swift addition of assertSuccess() and assertFailure() on EventLoopFuture (#2417) 2023-05-04 17:25:18 +01:00
EventLoopTest.swift Remove redundant availability guard (#2379) 2023-03-02 03:25:38 -08:00
FileRegionTest.swift Move NIO to NIOPosix, make NIO a shell. (#1936) 2021-08-16 16:50:40 +01:00
GetAddrInfoResolverTest.swift NIOPosix: use internal enumeration for GAI resolver (#2177) 2022-06-09 08:21:24 +01:00
HappyEyeballsTest.swift Add NIOAsyncChannel based connect methods to ClientBootstrap (#2437) 2023-06-06 03:36:53 -07:00
IPv4Header.swift Fix non Darwin/Linux builds (#2328) 2022-12-02 08:48:54 -08:00
IdleStateHandlerTest.swift Move NIO to NIOPosix, make NIO a shell. (#1936) 2021-08-16 16:50:40 +01:00
IntegerBitPackingTests.swift Move NIO to NIOPosix, make NIO a shell. (#1936) 2021-08-16 16:50:40 +01:00
MulticastTest.swift Use #fileID/#filePath instead of #file (#2306) 2022-11-03 16:43:13 +00:00
NIOLoopBoundTests.swift OnLoopSendable: Sendable containers if on EventLoop (#2370) 2023-02-27 07:11:37 -08:00
NIOThreadPoolTest.swift mark syncShutdownGracefully noasync (#2381) 2023-03-02 06:20:23 -08:00
NonBlockingFileIOTest.swift cap read+pread POSIX read sizes at Int32.max (#2323) 2022-11-28 13:19:12 +00:00
PendingDatagramWritesManagerTests.swift Pooled control message storage. (#2422) 2023-05-31 06:06:23 -07:00
PipeChannelTest.swift Add `NIOBSDSocket.ProtocolSubtype` (#2317) 2022-11-22 06:01:52 -08:00
PooledRecvBufferAllocatorTests.swift Add a pooled recv buffer allocator (#2362) 2023-02-20 17:00:19 +00:00
RawSocketBootstrapTests.swift Add `RawSocketBootstrap` (#2320) 2022-12-01 15:35:04 +01:00
SALChannelTests.swift Don't have channels stop reading on errors they tolerate. (#2408) 2023-04-20 11:09:02 +01:00
SALEventLoopTests.swift Fix testSchedulingTaskOnSleepingLoopWakesUpOnce (#1992) 2021-11-25 10:04:25 +00:00
SelectorTest.swift Add `NIOBSDSocket.ProtocolSubtype` (#2317) 2022-11-22 06:01:52 -08:00
SocketAddressTest.swift Fix Nightly Build to work with new Swift versions (#2288) 2022-10-13 14:29:40 +01:00
SocketChannelTest.swift Don't have channels stop reading on errors they tolerate. (#2408) 2023-04-20 11:09:02 +01:00
SocketOptionProviderTest.swift Use #fileID/#filePath instead of #file (#2306) 2022-11-03 16:43:13 +00:00
StreamChannelsTest.swift Use #fileID/#filePath instead of #file (#2306) 2022-11-03 16:43:13 +00:00
SyscallAbstractionLayer.swift Don't have channels stop reading on errors they tolerate. (#2408) 2023-04-20 11:09:02 +01:00
SystemCallWrapperHelpers.swift Use #fileID/#filePath instead of #file (#2306) 2022-11-03 16:43:13 +00:00
SystemTest.swift Move NIO to NIOPosix, make NIO a shell. (#1936) 2021-08-16 16:50:40 +01:00
TestUtils.swift Use #fileID/#filePath instead of #file (#2306) 2022-11-03 16:43:13 +00:00
ThreadTest.swift rename class Lock to struct NIOLock (#2266) 2022-09-21 07:36:42 -07:00
UniversalBootstrapSupportTest.swift Move NIO to NIOPosix, make NIO a shell. (#1936) 2021-08-16 16:50:40 +01:00
XCTest+AsyncAwait.swift mark syncShutdownGracefully noasync (#2381) 2023-03-02 06:20:23 -08:00