Structureswift-nio 2.84.0NIOCore
TestSource
A source used for driving a NIOAsyncChannelInboundStream
during tests.
- iOS
- 13+
- macOS
- 10.15+
- tvOS
- 13+
- watchOS
- 6+
struct TestSource
A source used for driving a NIOAsyncChannelInboundStream
during tests.
struct TestSource
import NIOCore
The core abstractions that make up SwiftNIO.
struct NIOAsyncChannelInboundStream<Inbound> where Inbound : Sendable
The inbound message asynchronous sequence of a NIOAsyncChannel
.
static func makeTestingStream() -> (NIOAsyncChannelInboundStream<Inbound>, NIOAsyncChannelInboundStream<Inbound>.TestSource)
Creates a new stream with a source for testing.
func finish(throwing error: (any Error)? = nil)
Finished the inbound stream.
func yield(_ element: Inbound)
Yields the element to the inbound stream.