Table of Contents

Property OnSocketAvailableAsync

Namespace
NATS.Client.Core
Assembly
NATS.Client.Core.dll

OnSocketAvailableAsync

Hook when socket is available.

public Func<INatsSocketConnection, ValueTask<INatsSocketConnection>>? OnSocketAvailableAsync { get; set; }

Property Value

Func<INatsSocketConnection, ValueTask<INatsSocketConnection>>

Remarks

Without handshake-first, the TLS upgrade happens after this hook, on the socket connection it returns. When TLS is required, that must be an INatsTlsUpgradeableSocketConnection or an INatsTlsSocketConnection; anything else fails the connection attempt.