C# Class Microsoft.AspNetCore.NodeServices.HostingModels.VirtualConnections.VirtualConnectionClient

Wraps an underlying physical read/write stream (e.g., named pipes, domain sockets, or TCP sockets) and exposes an API for making 'virtual connections', which act as independent read/write streams. Traffic over these virtual connections is multiplexed over the underlying physical stream. This is useful for fast stream-based inter-process communication because it avoids the overhead of opening a new physical connection each time a new communication channel is needed.
Inheritance: IDisposable
Show file Open project: aspnet/JavaScriptServices Class Usage Examples

Public Methods

Method Description
CloseInnerStream ( long innerStreamId, bool isAlreadyClosedRemotely ) : void
Dispose ( ) : void
OpenVirtualConnection ( ) : Stream
VirtualConnectionClient ( Stream underlyingTransport ) : System
WriteAsync ( long innerStreamId, byte data, int offset, int count, CancellationToken cancellationToken ) : Task

Private Methods

Method Description
CloseAllActiveStreams ( ) : void
ProcessNextFrameAsync ( ) : Task
ReadExactLength ( int lengthToRead ) : Task
RunReadLoop ( ) : void
ThrowIfReadLoopFailed ( ) : void

Method Details

CloseInnerStream() public method

public CloseInnerStream ( long innerStreamId, bool isAlreadyClosedRemotely ) : void
innerStreamId long
isAlreadyClosedRemotely bool
return void

Dispose() public method

public Dispose ( ) : void
return void

OpenVirtualConnection() public method

public OpenVirtualConnection ( ) : Stream
return Stream

VirtualConnectionClient() public method

public VirtualConnectionClient ( Stream underlyingTransport ) : System
underlyingTransport Stream
return System

WriteAsync() public method

public WriteAsync ( long innerStreamId, byte data, int offset, int count, CancellationToken cancellationToken ) : Task
innerStreamId long
data byte
offset int
count int
cancellationToken System.Threading.CancellationToken
return Task