NPRPC docs

struct NPRPCBidiStream

Swift

struct NPRPCBidiStream<TWrite, TRead> where TWrite : Sendable, TRead : Sendable

Both directions of a bidi_stream method: write what you send, iterate what the other side sends.

nprpc_swift/Sources/NPRPC/StreamReader.swift:550

Constructors

init(writer: NPRPCStreamWriter<TWrite>, reader: NPRPCStreamReader<TRead>)

Pairs a writer and a reader for one stream.

nprpc_swift/Sources/NPRPC/StreamReader.swift:557

Properties

let reader: NPRPCStreamReader<TRead>

Incoming items.

nprpc_swift/Sources/NPRPC/StreamReader.swift:554

let writer: NPRPCStreamWriter<TWrite>

Outgoing items.

nprpc_swift/Sources/NPRPC/StreamReader.swift:552