Support TCP fastopen on incoming and outgoing connections.

This commit is contained in:
Simon Kelley committed 2019-03-10 22:52:54 +00:00
1 parent c61c7bb225
commit 608aa9fcfc
4 files changed
+51 -10

No files matched your search

+5
View File
@@ -726,6 +726,11 @@ static int make_sock(union mysockaddr *addr, int type, int dienow)
if (type == SOCK_STREAM)
{
#ifdef TCP_FASTOPEN
int qlen = 5;
setsockopt(fd, SOL_TCP, TCP_FASTOPEN, &qlen, sizeof(qlen));
#endif
if (listen(fd, TCP_BACKLOG) == -1)
goto err;
}