Skip to content

Hmp1Transports

Namespace: Hex1b

Assembly: Hex1b.dll

Built-in transport helpers for creating stream sources used by .

csharp
public static class Hmp1Transports

Inheritance

ObjectHmp1Transports

Methods

ConnectUnixSocket(string, CancellationToken)

Connects to a Unix domain socket and returns a bidirectional stream.

Parameters:

Returns: Task<Stream>

csharp
public static Task<Stream> ConnectUnixSocket(string path, CancellationToken ct)

ListenUnixSocket(string, CancellationToken)

Listens on a Unix domain socket and yields a stream for each connecting client.

Parameters:

Returns: IAsyncEnumerable<Stream>

csharp
public static IAsyncEnumerable<Stream> ListenUnixSocket(string path, CancellationToken ct)

RetryingUnixSocket(string, RetryPolicy?)

Returns a stream factory that connects to a Unix domain socket, retrying with bounded exponential backoff until the socket file appears and

succeeds, or until the supplied is cancelled.

Parameters:

  • path (String): UDS path to connect to.
  • policy (RetryPolicy): Optional retry policy. Defaults to .

Returns: Func<CancellationToken, Stream>>

csharp
public static Func<CancellationToken, Task<Stream>> RetryingUnixSocket(string path, RetryPolicy? policy = null)

Released under the MIT License.