HybridConnectionStream Class

Definition

A Stream representing a connected HybridConnection. Use it just like any other Stream with the addition of a Shutdown method for notifying the other side of this connection that shutdown is occurring.

public abstract class HybridConnectionStream : System.IO.Stream
type HybridConnectionStream = class
    inherit Stream
Public MustInherit Class HybridConnectionStream
Inherits Stream
Inheritance
HybridConnectionStream

Properties

TrackingContext

Gets the TrackingContext for this stream.

WriteMode

Sets or gets the WriteMode for this stream. Default is WriteMode.Binary

Methods

CloseAsync(CancellationToken)

Closes this HybridConnectionStream instance asynchronously using a CancellationToken.

Dispose(Boolean)

Closes this HybridConnectionStream instance.

OnCloseAsync(CancellationToken)

Derived classes implement close logic in this method.

OnShutdownAsync(CancellationToken)

Derived classes implement shutdown logic in this method.

Shutdown()

Initiates a graceful close process by shutting down sending through this HybridConnectionStream. To disconnect cleanly and asynchronously, call Shutdown, wait for Read/ReadAsync to complete with a 0 byte read, then finally call Stream.Close();

ShutdownAsync(CancellationToken)

Initiates a graceful close process by shutting down sending through this HybridConnectionStream. To disconnect cleanly and asynchronously, call ShutdownAsync, wait for Read/ReadAsync to complete with a 0 byte read, then finally call Stream.CloseAsync();

ToString()

Returns a string that represents the current object. Includes a TrackingId for end to end correlation.

Applies to