---
name: "socket_quickack"
section: "3"
platform: "linux"
package: "libowfat-dev"
version: "0.32-5"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/socket_quickack"
---

# socket\_quickack(3)

turn TCP Quick ACK mode on or off

## NAME

socket\_quickack - turn TCP Quick ACK mode on or off

## SYNTAX

**#include \<libowfat/socket.h\>**

int **socket\_quickack**(int *s*,int *value*);

## DESCRIPTION

socket\_quickack switches TCP Quick ACK mode on (value=1) or off (value=0).  If the platform does not support this functionality, returns -1 and sets errno to ENOPROTOOPT (or ENOSYS if the platform does not define ENOPROTOOPT).

TCP Quick ACK mode is on by default because the operating system has to assume it's an interactive connection.  In that case, an ACK will be sent quickly after data came in.  If your code handles non-interactive server connections, it may make sense to switch Quick ACK mode off, telling the kernel to delay sending ACKs because the server is going to respond to incoming requests anyway, so the ACK can be piggy-backed onto that response, saving useless network traffic.

Normally socket\_quickack returns 0. If anything goes wrong, socket\_quickack returns -1, setting errno appropriately.

## EXAMPLE

  \#include \<libowfat/socket.h\>

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

  *s* = socket\_tcp4b();\
   socket\_quickack(s);\
   socket\_bind4\_reuse(s,ip,p);\
   socket\_listen(16);

## SEE ALSO

[socket\_fastopen(3)](/socket_fastopen/3.md)
