executeThenClose(_:)

Provides scoped access to the inbound and outbound side of the underlying Channel.

AsyncChannel.swift:287
iOS
13+
macOS
10.15+
tvOS
13+
watchOS
6+
func executeThenClose<Result>(_ body: (_ inbound: NIOAsyncChannelInboundStream<Inbound>, _ outbound: NIOAsyncChannelOutboundWriter<Outbound>) async throws -> Result) async throws -> Result

Parameters

body

A closure that gets scoped access to the inbound and outbound.