Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
socket_fastopen(3)	   Library Functions Manual	    socket_fastopen(3)

NAME
       socket_fastopen - enable	TCP Fast Open on a server-side TCP socket

SYNTAX
       #include	<socket.h>

       int socket_fastopen(int s);

DESCRIPTION
       socket_fastopen	enables	 TCP  Fast  Open  support on a server-side TCP
       socket.	Call this before socket_listen().  If the  platform  does  not
       support	this  functionality,  returns -1 and sets errno	to ENOPROTOOPT
       (or ENOSYS if the platform does not define ENOPROTOOPT).

       Normally	 socket_fastopen  returns   0.	 If   anything	 goes	wrong,
       socket_fastopen returns -1, setting errno appropriately.

EXAMPLE
	 #include <socket.h>

	 int s;
	 char ip[4];
	 uint16	p;

	 s = socket_tcp4b();
	 socket_fastopen(s);
	 socket_bind4_reuse(s,ip,p);
	 socket_listen(16);

SEE ALSO
       socket_fastopen_connect4(3), socket_fastopen_connect6(3)

							    socket_fastopen(3)

NAME | SYNTAX | DESCRIPTION | EXAMPLE | SEE ALSO

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=socket_fastopen&sektion=3&manpath=FreeBSD+12.1-RELEASE+and+Ports>

home | help