Skip to content

Conversation

@mattrm456
Copy link
Contributor

@mattrm456 mattrm456 commented Nov 6, 2025

This PR adds several features to support more robust procedure when initiating connections and handling their failures. First, this PR adds a new class, ntsa::Backoff, that represents either an arithmetic or geometric backoff to a progression of a time interval. Second, a optional ntsa::Backoff policy is supported in the scheduling of a periodic ntci::Timer by specification of the backoff in the associated ntca::TimerOptions used to create the timer. Third, an optional ntsa::Backoff policy can also be indicated in the ntca::ConnectOptions specified when initiating a new asynchronous connect operation of an ntci::StreamSocket. Finally, this PR adds a new ntca::ConnectStrategy enumeration, which allows the user to indicate how the resolution of a domain name should be handled when connecting an ntci::StreamSocket to a domain name: either "resolve the domain name and pick first address supplied by resolution process, an re-resolve after each connection failure" (the current default, and previous behavior), or "resolve the domain name and try each address to which that name resolves before re-resolving" (the new supported behavior.) The connection strategy is indicated in the ntca::ConnectOptions specified when initiating an asynchronous connect operation on an ntci::StreamSocket.

@mattrm456 mattrm456 changed the title Prototype enhancements to the connection process Support a variety of connection strategies and backoff when connecting to domain names Nov 20, 2025
@mattrm456 mattrm456 merged commit 8697f57 into bloomberg:main Nov 20, 2025
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant