Table of Contents

Struct ServerFactory.ClientOptions

Namespace
Microsoft.ServiceHub.Framework
Assembly
Microsoft.ServiceHub.Framework.dll

Options that can influence the IPC client.

public record struct ServerFactory.ClientOptions : IEquatable<ServerFactory.ClientOptions>
Implements
Inherited Members

Properties

CpuSpinOverFirstChanceExceptions

Gets a value indicating whether to prefer a CPU spinning wait over throwing first chance exceptions as a way to periodically sleep while waiting.

public bool CpuSpinOverFirstChanceExceptions { readonly get; init; }

Property Value

bool

Remarks

This property is only meaningful when FailFast is false.

FailFast

Gets a value indicating whether to fail immediately with a TimeoutException if the server is not ready to accept the connection. When this is false, continuously retry or wait for the server to listen for and respond to connection requests until it is canceled.

public bool FailFast { readonly get; init; }

Property Value

bool

ServerAlreadyListening

Gets a value indicating whether the server is known to have already created the pipe.

public bool ServerAlreadyListening { readonly get; init; }

Property Value

bool

Remarks

Set this when the pipe name came from the server itself, which only publishes the name after it begins listening. Under that condition a missing pipe proves the server is gone, so the connection fails with FileNotFoundException instead of waiting for a pipe that will never be created. A pipe that exists but has no free instance is still retried.

This property is only meaningful when FailFast is false.