Files
swift-nio/Sources
Cory Benfield 2a65f2b4be Add ChannelCore.tryUnwrapAs (#1919)
Motivation:

For Channel implementations, we implemented ChannelCore.unwrapData to
allow them to unwrap a NIOAny into their expected data type. This
remains our recommended flow, as Channels are supposed to know what data
type they can send. However, in a few cases the Channel has a runtime
type: in particular, EmbeddedChannel is capable of tolerating nearly
anything.

As we're coming to split the code apart, we'll likely want
EmbeddedChannel to live in a different module than NIOCore. To that end,
we need to add new API to ChannelCore to allow the specific
EmbeddedChannel use-case.

Modifications:

- Implement ChannelCore.tryUnwrapData.
- Use this within EmbeddedChannel.

Result:

EmbeddedChannel can attempt to unwrap things.
2021-07-26 18:18:46 +01:00
..
2021-01-22 18:39:10 +00:00
2021-07-26 18:18:46 +01:00