socket_tcpnodelay.c (287B)
1 /* ISC license. */ 2 3 #include <skalibs/nonposix.h> 4 5 #include <sys/socket.h> 6 #include <netinet/in.h> 7 #include <netinet/tcp.h> 8 9 #include <skalibs/socket.h> 10 11 int socket_tcpnodelay (int s) 12 { 13 static int const opt = TCP_NODELAY ; 14 return setsockopt(s, IPPROTO_TCP, 1, &opt, sizeof(int)) ; 15 }