Property OnSocketAvailableAsync
OnSocketAvailableAsync
Hook when socket is available.
public Func<INatsSocketConnection, ValueTask<INatsSocketConnection>>? OnSocketAvailableAsync { get; set; }
Property Value
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.