swift-nio/Sources
Felix Schlegel 47b6289d93
`Embedded`: `getOption(ChannelOptions.allowRemoteHalfClosure)` should not `fatalError` (#2429)
* Embedded: getOption(.allowRemoteHalfClosure) -> OK

Motivation:

In `swift-nio-ssl`, I am currently working on allowing half-closures
which relies on querying the underlying channel if
`ChannelOptions.Types.AllowRemoteHalfClosureOption` is enabled. As a lot of
`swift-nio-ssl`'s tests rely on `EmbeddedChannel` and it did not support
this option, a lot of the tests failed.

Modifications:

* add a `public var allowRemoteHalfClosure` to `EmbeddedChannel`
* enable setting/getting
  `ChannelOptions.Types.AllowRemoteHalfClosureOption` in
`EmbeddedChannel` (only modifies the `allowRemoteHalfClosure` variable
* add test for new behaviour

* AsyncTestingChannel: getOption(.allowRemoteHalfClosure) -> OK

Motivation:

`AsyncTestingChannel` interface should be in step with `EmbeddedChannel`
interface. Therefore also add support for the
`AllowRemoteHalfClosureOption`

Modifications:

* add a `public var allowRemoteHalfClosure` to `AsyncTestingChannel`
* enable setting/getting
  `ChannelOptions.Types.AllowRemoteHalfClosureOption` in `AsyncTestingChannel`
  (only modifies the `allowRemoteHalfClosure` variable
* add tests for new behaviour

* Synchronize access to allowRemoteHalfClosure

Modifications:

* add `ManagedAtomic` property `_allowRemoteHalfClosure` to
  `EmbeddedChannelCore`
* make sure that access to `allowRemoteHalfClosure` from
  `AsyncTestingChannel` and `EmbeddedChannel` is synchronized by
  accessing underlying atomic value in `channelcore`

* Update allocation limits
2023-05-19 09:47:47 -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 addition of assertSuccess() and assertFailure() on EventLoopFuture (#2417) 2023-05-04 17:25:18 +01: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 `AsyncChannel` based `ServerBootstrap.bind()` methods (#2403) 2023-04-26 07:17:07 -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