mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
No one cares about the TOS value but shouldn't hurt to set it
This commit is contained in:
parent
87ebb2f03e
commit
9d488d7a28
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue