forked from netty/netty
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make it possible to query KQueue if TCP FastOpen is available (netty#…
…11766) Motivation: While TCP FastOpen is mostly a pure optimisation (albeit one that demands idempotency of TFO messages), it can still sometimes be useful to query whether it can be expected to be available. This information can for instance be useful for telemetry, where you want to include if TFO is available to the system, to see if it helps overall. For kqueue, it is possible to query `sysctl` to determine if client-side or server-side TFO is available. Modification: Add static methods to KQueue that delegates to IS_SUPPORTING_TCP_FASTOPEN_{CLIENT/SERVER} fields. These fields are populated when Native is initialized, by querying `sysctl` in a platform-specific way. Whether TFO is available is also predicated upon kqueue itself being available. Result: People, who rely on kqueue, can now query their system in pure Java about whether TFO is available or not. Co-authored-by: Norman Maurer <norman_maurer@apple.com>
- Loading branch information
1 parent
f65696c
commit 5361e99
Showing
4 changed files
with
109 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters