NPRPC docs

function createStreamManagerBidiStream

Swift

func createStreamManagerBidiStream<TWrite, TRead>(streamManager: UnsafeMutableRawPointer, streamId: UInt64, buffer: FlatBuffer, initialPayloadCapacity: Int, unreliable: Bool = false, initialCredits: UInt32 = 0, producerWindow: UInt32 = kInitialWindowSize, serializer: @escaping (FlatBuffer, Int, TWrite) -> Void, deserializer: @escaping (UnsafeRawPointer, Int) -> TRead) -> NPRPCBidiStream<TWrite, TRead> where TWrite : Sendable, TRead : Sendable

Both halves of a bidi stream on a session's stream manager. Used by generated code.

initialCredits
consumer's advertised window for our writer direction (from StreamInit.initial_credits when we're the servant; 0 = legacy).
producerWindow
the window we advertised for our reader direction (pass defaultReaderWindow when the stub sent it in StreamInit).

nprpc_swift/Sources/NPRPC/StreamReader.swift:750