• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# `TCP_FASTOPEN` support in lws
2
3Lws supports enabling TCP_FASTOPEN oper-vhost for listen sockets.
4
5## Enabling per vhost serving
6
7Set the `info.fo_listen_queue` to nonzero at vhost creation.  Different
8platforms interpret this number differently, zero always disables it
9but on Linux, the number is interpreted as a SYN queue length.
10
11On FreeBSD, OSX and Windows, the number is basically a bool, with the
12extra restriction OSX and Windows only allows 0 or 1.
13
14## Enabling Linux for serving with TCP_FASTOPEN
15
16To configure the kernel for listening socket TCP_FASTOPEN, you need
17
18```
19# sysctl -w net.ipv4.tcp_fastopen=3
20```
21
22## Enabling BSD for serving with TCP_FASTOPEN
23
24At least on FreeBSD, you need to set the net.inet.tcp.fastopen.enabled
25sysctl to 1
26
27## Enabling Windows for serving with TCP_FASTOPEN
28
29```
30> netsh int tcp set global fastopenfallback=disabled
31> netsh int tcp show global
32```
33