Table of Contents

Interface ITransport

Namespace
Foundation.Data.Doublets.Cli.Ipc
Assembly
Foundation.Data.Doublets.Cli.dll

One IPC mechanism as a reliable, ordered, duplex byte channel (issue #140).

public interface ITransport

Remarks

Every member may be called from several threads at once: one thread reads while another writes.

Properties

Kind

The endpoint kind, such as shm.

string Kind { get; }

Property Value

string

Methods

CloseWrite()

Ends the outgoing direction; the peer then reads the end of its stream.

void CloseWrite()

Flush()

Sends everything written so far.

void Flush()

Read(Span<byte>, TimeSpan?)

Reads at least one byte, waiting up to timeout (null waits forever); 0 at the end of the incoming direction. A timeout raises an TimedOut error.

int Read(Span<byte> buffer, TimeSpan? timeout)

Parameters

buffer Span<byte>
timeout TimeSpan?

Returns

int

Shutdown()

Hangs up both directions; idempotent.

void Shutdown()

Write(ReadOnlySpan<byte>)

Writes at least one byte of a non-empty buffer and returns how many.

int Write(ReadOnlySpan<byte> buffer)

Parameters

buffer ReadOnlySpan<byte>

Returns

int