2014-10-07 11:40:21 +00:00
|
|
|
#include "socket.h"
|
2015-04-23 15:15:08 +00:00
|
|
|
#ifndef __MINGW32__
|
2014-10-07 11:40:21 +00:00
|
|
|
#include <sys/types.h>
|
|
|
|
#include <sys/socket.h>
|
|
|
|
#include <netinet/tcp.h>
|
2015-04-23 15:15:08 +00:00
|
|
|
#endif
|
2014-10-07 11:40:21 +00:00
|
|
|
#include <errno.h>
|
|
|
|
|
|
|
|
int socket_quickack(int s,int value) {
|
|
|
|
#ifdef TCP_QUICKACK
|
|
|
|
return setsockopt(s, SOL_TCP, TCP_QUICKACK, &value, sizeof(int));
|
|
|
|
#else
|
|
|
|
#ifdef ENOPROTOOPT
|
|
|
|
errno=ENOPROTOOPT;
|
|
|
|
#else
|
|
|
|
errno=ENOSYS;
|
|
|
|
#endif
|
|
|
|
return -1;
|
|
|
|
#endif
|
|
|
|
}
|