mirror of
https://github.com/apple/swift-nio
synced 2026-11-24 04:37:54 +00:00
Support options on AsyncTestingChannel and EmbeddedChannel Fixes #3305 ### Motivation: The channels are intended for testing purposes so while most options have no practical use setting and getting them can be useful for testing. For example a traceroute implementation will set TTL to the current hop number. Testing such an implementation requires the channels to pretend to support the TTL option. ### Modifications: Added option storage to AsyncTestingChannel and EmbedededChannel and made `getOptionSync` and `setOptionSync` read and write from that storage. ### Result: EmbeddedChannel and AsyncTestingChannel support changing their options. --------- Co-authored-by: Cory Benfield <lukasa@apple.com>