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 RpcStreamAttachmentInheritance
Section titled “Inheritance”Inherited Members
Section titled “Inherited Members”object.Equals(object), object.Equals(object, object), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object, object), object.ToString()
Remarks
Section titled “Remarks”Each attachment supports one outbound registration at a time. Cancellation keeps that claim until the active source operation and stream pump cleanup finish.
Properties
Section titled “Properties”Handle
Section titled “ Handle”public RpcStreamHandle Handle { get; }Property Value
Section titled “Property Value”Methods
Section titled “Methods”FromAsyncEnumerable<T>(RpcStreamHandle, IAsyncEnumerable<T>)
Section titled “ FromAsyncEnumerable<T>(RpcStreamHandle, IAsyncEnumerable<T>)”public static RpcStreamAttachment FromAsyncEnumerable<T>(RpcStreamHandle handle, IAsyncEnumerable<T> source)Parameters
Section titled “Parameters”handle RpcStreamHandle
source IAsyncEnumerable<T>
Returns
Section titled “Returns”Type Parameters
Section titled “Type Parameters”T
FromPipe(RpcStreamHandle, Pipe, bool)
Section titled “ FromPipe(RpcStreamHandle, Pipe, bool)”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)Parameters
Section titled “Parameters”handle RpcStreamHandle
pipe Pipe
completeReader bool
Returns
Section titled “Returns”FromStream(RpcStreamHandle, Stream, bool)
Section titled “ FromStream(RpcStreamHandle, Stream, bool)”public static RpcStreamAttachment FromStream(RpcStreamHandle handle, Stream stream, bool leaveOpen = true)Parameters
Section titled “Parameters”handle RpcStreamHandle
stream Stream
leaveOpen bool