tcp-fast-open revision 7e89f3c9f83c3cac813a7295363217e869f8e249
Copyright (C) 2016 Internet Systems Consortium, Inc. ("ISC")
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
Some systems (Linux, FreeBSD, OS X/macOS and Windows 10) support
the TCP Fast Open (RFC 7413) mechanism in their recent versions.
BIND 9 supports this on the server side.
When the TCP_FASTOPEN socket option is defined after the listen()
system call the socket code in the libisc set the option with
the half of the listen backlog (so the fast open maximum queue length
is the half of the pending connection queue length).
Any failure is logged and ignored.
System specific notes:
- FreeBSD doesn't interpret the argument as a queue length but
only as an on/off switch.
- Apple OS X/macOS allows only 0 or 1 so the code puts 1 for this system.
- Windows 10 uses a 0/1 char flag? Note that TCP_FASTOPEN is defined
only in SDK 10.0.14393.0 or higher (Visual Studio 2015 requires
extra setting of the "Target Platform Version" in all project
properties).
- the only other system known to support this is Linux.