No one cares about the TOS value but shouldn't hurt to set it

This commit is contained in:
def 2014-12-07 14:19:03 +01:00
parent 87ebb2f03e
commit 9d488d7a28

View file

@ -1153,6 +1153,11 @@ NETSOCKET net_udp_create(NETADDR bindaddr)
/* set receive buffer size */
setsockopt(socket, SOL_SOCKET, SO_RCVBUF, (char*)&recvsize, sizeof(recvsize));
/* set DSCP/TOS */
int iptos = 0x10 /* IPTOS_LOWDELAY */;
//int iptos = 46; /* High Priority */
setsockopt(socket, IPPROTO_IP, IP_TOS, (char*)&iptos, sizeof(iptos));
}
}
@ -1175,6 +1180,11 @@ NETSOCKET net_udp_create(NETADDR bindaddr)
/* set receive buffer size */
setsockopt(socket, SOL_SOCKET, SO_RCVBUF, (char*)&recvsize, sizeof(recvsize));
/* set DSCP/TOS */
int iptos = 0x10 /* IPTOS_LOWDELAY */;
//int iptos = 46; /* High Priority */
setsockopt(socket, IPPROTO_IP, IP_TOS, (char*)&iptos, sizeof(iptos));
}
}