mirror of
https://github.com/mumble-voip/mumble.git
synced 2025-10-26 11:19:16 +00:00
Server IP TOS
git-svn-id: https://mumble.svn.sourceforge.net/svnroot/mumble/trunk@339 05730e5d-ab1b-0410-a4ac-84af385074fa
This commit is contained in:
parent
09b5cf3648
commit
9290b59ea3
14
Server.cpp
14
Server.cpp
@ -37,6 +37,14 @@
|
||||
#include "Connection.h"
|
||||
#include "Server.h"
|
||||
|
||||
#ifdef Q_OS_UNIX
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/ip.h>
|
||||
#include <errno.h>
|
||||
#endif
|
||||
|
||||
Server *g_sServer;
|
||||
ServerParams g_sp;
|
||||
|
||||
@ -104,6 +112,12 @@ Server::Server() {
|
||||
if (! qusUdp->bind(g_sp.iPort))
|
||||
qFatal("Server: UDP Bind failed");
|
||||
|
||||
#ifdef Q_OS_UNIX
|
||||
int val = IPTOS_PREC_FLASHOVERRIDE | IPTOS_LOWDELAY | IPTOS_THROUGHPUT;
|
||||
if (setsockopt(qusUdp->socketDescriptor(), SOL_IP, IP_TOS, &val, sizeof(val)))
|
||||
qWarning("Server: Failed to set TOS for UDP Socket");
|
||||
#endif
|
||||
|
||||
connect(qusUdp, SIGNAL(readyRead()), this, SLOT(udpReady()));
|
||||
|
||||
log(QString("Server listening on port %1").arg(g_sp.iPort));
|
||||
|
||||
Loading…
Reference in New Issue
Block a user