summaryrefslogtreecommitdiff
path: root/src/libstddjb/socket_delay.c
blob: 7d1a8db2880e41c475f51e3494fdd0a00d8d0299 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
/* ISC license. */

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

int socket_tcpnodelay (int s)
{
  static int const opt = TCP_NODELAY ;
  return setsockopt(s, IPPROTO_TCP, 1, &opt, sizeof(int)) ;
}