aboutsummaryrefslogtreecommitdiff
path: root/zenhttp/httpasio.cpp
diff options
context:
space:
mode:
authorzousar <[email protected]>2022-02-02 09:47:47 -0700
committerzousar <[email protected]>2022-02-02 09:47:47 -0700
commit6ec95fc1915057bafbe0ea2d4393d33741c7dcc0 (patch)
treecde8dc9c5eb03568524de8fb49c8dd627ddecedb /zenhttp/httpasio.cpp
parentUse SIO_LOOPBACK_FAST_PATH on Windows and increase buffer sizes (diff)
downloadzen-6ec95fc1915057bafbe0ea2d4393d33741c7dcc0.tar.xz
zen-6ec95fc1915057bafbe0ea2d4393d33741c7dcc0.zip
Add comment about loopback fast path as suggested in review.
Diffstat (limited to 'zenhttp/httpasio.cpp')
-rw-r--r--zenhttp/httpasio.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/zenhttp/httpasio.cpp b/zenhttp/httpasio.cpp
index ae96c7637..55ce867a4 100644
--- a/zenhttp/httpasio.cpp
+++ b/zenhttp/httpasio.cpp
@@ -946,6 +946,10 @@ struct HttpAcceptor
}
#if ZEN_PLATFORM_WINDOWS
+ // On Windows, loopback connections can take advantage of a faster code path optionally with this flag.
+ // This must be used by both the client and server side, and is only effective in the absence of
+ // Windows Filtering Platform (WFP) callouts which can be installed by security software.
+ // https://docs.microsoft.com/en-us/windows/win32/winsock/sio-loopback-fast-path
SOCKET NativeSocket = m_Acceptor.native_handle();
int LoopbackOptionValue = 1;
DWORD OptionNumberOfBytesReturned = 0;