47b6289d93
* 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 |
||
---|---|---|
.. | ||
AsyncTestingChannelTests.swift | ||
AsyncTestingEventLoopTests.swift | ||
EmbeddedChannelTest.swift | ||
EmbeddedEventLoopTest.swift | ||
TestUtils.swift | ||
XCTest+AsyncAwait.swift |