Skip to content

Class RpcStreamAttachment

Namespace: DotBoxD.Services.Streaming.Frames
Assembly: DotBoxD.Services.dll

A local source that will be streamed over an RPC request or response.

public abstract class RpcStreamAttachment

object ← RpcStreamAttachment

object.Equals(object), object.Equals(object, object), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object, object), object.ToString()

Each attachment supports one outbound registration at a time. Cancellation keeps that claim until the active source operation and stream pump cleanup finish.

public RpcStreamHandle Handle { get; }

RpcStreamHandle

FromAsyncEnumerable<T>(RpcStreamHandle, IAsyncEnumerable<T>)

Section titled “ FromAsyncEnumerable<T>(RpcStreamHandle, IAsyncEnumerable<T>)”
public static RpcStreamAttachment FromAsyncEnumerable<T>(RpcStreamHandle handle, IAsyncEnumerable<T> source)

handle RpcStreamHandle

source IAsyncEnumerable<T>

RpcStreamAttachment

T

Streams from a pipe, splitting large segments into bounded chunks. When completeReader is false, cancellation or a failed send leaves the reader open and unsent bytes available to the caller. Only chunks whose send completed successfully are consumed. Writer backpressure remains until the caller consumes or discards retained bytes.

public static RpcStreamAttachment FromPipe(RpcStreamHandle handle, Pipe pipe, bool completeReader = false)

handle RpcStreamHandle

pipe Pipe

completeReader bool

RpcStreamAttachment

FromStream(RpcStreamHandle, Stream, bool)

Section titled “ FromStream(RpcStreamHandle, Stream, bool)”
public static RpcStreamAttachment FromStream(RpcStreamHandle handle, Stream stream, bool leaveOpen = true)

handle RpcStreamHandle

stream Stream

leaveOpen bool

RpcStreamAttachment