version 1.3 | | version 1.4 |
---|
| | |
| | |
#include <string.h> | | #include <string.h> |
#include <netinet/in.h> /* for htons & co. */ | | #include <netinet/in.h> /* for htons & co. */ |
| | #include <netinet/ip.h> /* for IPTOS */ |
#include <unistd.h> | | #include <unistd.h> |
#include <netdb.h> | | #include <netdb.h> |
#include <stdlib.h> | | #include <stdlib.h> |
| | |
mysock=-1; | | mysock=-1; |
FAIL("bind() to UDP port %d failed: %m",port); | | FAIL("bind() to UDP port %d failed: %m",port); |
} | | } |
| | #ifdef IPTOS_LOWDELAY |
| | int tos = IPTOS_LOWDELAY; |
| | if (setsockopt(mysock,IPPROTO_IP,IP_TOS,&tos,sizeof(tos))) { |
| | msg("setsockopt(IPTOS_LOWDELAY) failed: %m"); |
| | } |
| | #endif |
| | |
return 0; | | return 0; |
} | | } |