1socket_quickack(3) Library Functions Manual socket_quickack(3)
2
3
4
6 socket_quickack - turn TCP Quick ACK mode on or off
7
9 #include <socket.h>
10
11 int socket_quickack(int s,int value);
12
14 socket_quickack switches TCP Quick ACK mode on (value=1) or off
15 (value=0). If the platform does not support this functionality,
16 returns -1 and sets errno to ENOPROTOOPT (or ENOSYS if the platform
17 does not define ENOPROTOOPT).
18
19 TCP Quick ACK mode is on by default because the operating system has to
20 assume it's an interactive connection. In that case, an ACK will be
21 sent quickly after data came in. If your code handles non-interactive
22 server connections, it may make sense to switch Quick ACK mode off,
23 telling the kernel to delay sending ACKs because the server is going to
24 respond to incoming requests anyway, so the ACK can be piggy-backed
25 onto that response, saving useless network traffic.
26
27 Normally socket_quickack returns 0. If anything goes wrong,
28 socket_quickack returns -1, setting errno appropriately.
29
30
32 #include <socket.h>
33
34 int s;
35 char ip[4];
36 uint16 p;
37
38 s = socket_tcp4b();
39 socket_quickack(s);
40 socket_bind4_reuse(s,ip,p);
41 socket_listen(16);
42
43
45 socket_fastopen(3)
46
47
48
49 socket_quickack(3)