aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstddjb/socket_tcpdelay.c
blob: 8f1c026502dd534523e2b56c2a3c0e3a8bb72385 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/* ISC license. */

#include <skalibs/nonposix.h>

#include <sys/socket.h>
#include <netinet/in.h>
#include <netinet/tcp.h>

#include <skalibs/socket.h>

int socket_tcpdelay (int s)
{
  static int const val = 0 ;
  return setsockopt(s, IPPROTO_TCP, TCP_NODELAY, &val, sizeof(int)) ;
}