diff options
| author | Wei Wang <weiwan@google.com> | 2021-09-16 21:16:06 -0700 |
|---|---|---|
| committer | Alejandro Colomar <alx.manpages@gmail.com> | 2021-09-20 21:22:58 +0200 |
| commit | dda0c305d95efa11f41440b1571322ad1c821063 (patch) | |
| tree | 30a3d1c91b2c569a33b5758bd85869870ab3f682 /man2 | |
| parent | 3bb47e8c64fb88d59ac78b8a86f51d9d2f3db85c (diff) | |
| download | man-pages-dda0c305d95efa11f41440b1571322ad1c821063.tar.gz | |
send.2: Add MSG_FASTOPEN flag
MSG_FASTOPEN flag is available since Linux 3.7. Add detailed description
in the manpage according to RFC7413.
Signed-off-by: Wei Wang <weiwan@google.com>
Reviewed-by: Yuchung Cheng <ycheng@google.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Diffstat (limited to 'man2')
| -rw-r--r-- | man2/send.2 | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/man2/send.2 b/man2/send.2 index fd28fed908..acaa05be90 100644 --- a/man2/send.2 +++ b/man2/send.2 @@ -252,6 +252,38 @@ data on sockets that support this notion (e.g., of type the underlying protocol must also support .I out-of-band data. +.TP +.BR MSG_FASTOPEN " (since Linux 3.7)" +Attempts TCP Fast Open (RFC7413) and sends data in the SYN like a +combination of +.BR connect (2) +and +.BR write (2), +by performing an implicit +.BR connect (2) +operation. +It blocks until the data is buffered and the handshake has completed. +For a non-blocking socket, +it returns the number of bytes buffered and sent in the SYN packet. +If the cookie is not available locally, +it returns +.BR EINPROGRESS , +and sends a SYN with a Fast Open cookie request automatically. +The caller needs to write the data again when the socket is connected. +On errors, +it sets the same +.I errno +as +.BR connect (2) +if the handshake fails. +This flag requires enabling TCP Fast Open client support on sysctl +.IR net.ipv4.tcp_fastopen . +.IP +Refer to +.B TCP_FASTOPEN_CONNECT +socket option in +.BR tcp (7) +for an alternative approach. .SS sendmsg() The definition of the .I msghdr |
