1gnutls_transport_set_fastopen(3)    gnutls    gnutls_transport_set_fastopen(3)
2
3
4

NAME

6       gnutls_transport_set_fastopen - API function
7

SYNOPSIS

9       #include <gnutls/socket.h>
10
11       void  gnutls_transport_set_fastopen(gnutls_session_t  session,  int fd,
12       struct sockaddr * connect_addr, socklen_t connect_addrlen, unsigned int
13       flags);
14

ARGUMENTS

16       gnutls_session_t session
17                   is a gnutls_session_t type.
18
19       int fd      is the session's socket descriptor
20
21       struct sockaddr * connect_addr
22                   is the address we want to connect to
23
24       socklen_t connect_addrlen
25                   is the length of  connect_addr
26
27       unsigned int flags
28                   must be zero
29

DESCRIPTION

31       Enables TCP Fast Open (TFO) for the specified TLS client session.  That
32       means that TCP connection establishment and  the  transmission  of  the
33       first  TLS client hello packet are combined. The peer's address must be
34       specified in  connect_addr and  connect_addrlen , and the socket speci‐
35       fied by  fd should not be connected.
36
37       TFO only works for TCP sockets of type AF_INET and AF_INET6.  If the OS
38       doesn't support TCP fast open this function will result to gnutls using
39       connect() transparently during the first write.
40

NOTE

42       This  function overrides all the transport callback functions.  If this
43       is undesirable, TCP Fast Open must be implemented on the user  callback
44       functions  without  calling  this  function.  When using this function,
45       transport callbacks must not be set, and gnutls_transport_set_ptr()  or
46       gnutls_transport_set_int() must not be called.
47
48       On  GNU/Linux  TFO  has  to  be enabled at the system layer, that is in
49       /proc/sys/net/ipv4/tcp_fastopen, bit 0 has to be set.
50
51       This function has no effect on server sessions.
52

SINCE

54       3.5.3
55

REPORTING BUGS

57       Report bugs to <bugs@gnutls.org>.
58       Home page: http://www.gnutls.org
59
60
62       Copyright © 2001-2018 Free Software Foundation, Inc., and others.
63       Copying and distribution of this file, with  or  without  modification,
64       are  permitted  in  any  medium  without royalty provided the copyright
65       notice and this notice are preserved.
66

SEE ALSO

68       The full documentation for gnutls is maintained as  a  Texinfo  manual.
69       If  the /usr/share/doc/gnutls/ directory does not contain the HTML form
70       visit
71
72       http://www.gnutls.org/manual/
73
74gnutls                               3.6.5    gnutls_transport_set_fastopen(3)
Impressum