mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 18:13:05 +02:00
Merge branch 'master' of https://github.com/highfidelity/hifi into improve-domain-check
This commit is contained in:
commit
6116060858
5 changed files with 28 additions and 18 deletions
|
@ -30,7 +30,7 @@ const int PEER_SILENCE_THRESHOLD_MSECS = 5 * 1000;
|
||||||
IceServer::IceServer(int argc, char* argv[]) :
|
IceServer::IceServer(int argc, char* argv[]) :
|
||||||
QCoreApplication(argc, argv),
|
QCoreApplication(argc, argv),
|
||||||
_id(QUuid::createUuid()),
|
_id(QUuid::createUuid()),
|
||||||
_serverSocket(),
|
_serverSocket(0, false),
|
||||||
_activePeers()
|
_activePeers()
|
||||||
{
|
{
|
||||||
// start the ice-server socket
|
// start the ice-server socket
|
||||||
|
|
|
@ -29,9 +29,10 @@
|
||||||
|
|
||||||
using namespace udt;
|
using namespace udt;
|
||||||
|
|
||||||
Socket::Socket(QObject* parent) :
|
Socket::Socket(QObject* parent, bool shouldChangeSocketOptions) :
|
||||||
QObject(parent),
|
QObject(parent),
|
||||||
_synTimer(new QTimer(this))
|
_synTimer(new QTimer(this)),
|
||||||
|
_shouldChangeSocketOptions(shouldChangeSocketOptions)
|
||||||
{
|
{
|
||||||
connect(&_udpSocket, &QUdpSocket::readyRead, this, &Socket::readPendingDatagrams);
|
connect(&_udpSocket, &QUdpSocket::readyRead, this, &Socket::readPendingDatagrams);
|
||||||
|
|
||||||
|
@ -49,17 +50,20 @@ Socket::Socket(QObject* parent) :
|
||||||
|
|
||||||
void Socket::bind(const QHostAddress& address, quint16 port) {
|
void Socket::bind(const QHostAddress& address, quint16 port) {
|
||||||
_udpSocket.bind(address, port);
|
_udpSocket.bind(address, port);
|
||||||
setSystemBufferSizes();
|
|
||||||
|
if (_shouldChangeSocketOptions) {
|
||||||
|
setSystemBufferSizes();
|
||||||
|
|
||||||
#if defined(Q_OS_LINUX)
|
#if defined(Q_OS_LINUX)
|
||||||
auto sd = _udpSocket.socketDescriptor();
|
auto sd = _udpSocket.socketDescriptor();
|
||||||
int val = IP_PMTUDISC_DONT;
|
int val = IP_PMTUDISC_DONT;
|
||||||
setsockopt(sd, IPPROTO_IP, IP_MTU_DISCOVER, &val, sizeof(val));
|
setsockopt(sd, IPPROTO_IP, IP_MTU_DISCOVER, &val, sizeof(val));
|
||||||
#elif defined(Q_OS_WINDOWS)
|
#elif defined(Q_OS_WINDOWS)
|
||||||
auto sd = _udpSocket.socketDescriptor();
|
auto sd = _udpSocket.socketDescriptor();
|
||||||
int val = 0; // false
|
int val = 0; // false
|
||||||
setsockopt(sd, IPPROTO_IP, IP_DONTFRAGMENT, &val, sizeof(val));
|
setsockopt(sd, IPPROTO_IP, IP_DONTFRAGMENT, &val, sizeof(val));
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Socket::rebind() {
|
void Socket::rebind() {
|
||||||
|
|
|
@ -54,7 +54,7 @@ class Socket : public QObject {
|
||||||
public:
|
public:
|
||||||
using StatsVector = std::vector<std::pair<HifiSockAddr, ConnectionStats::Stats>>;
|
using StatsVector = std::vector<std::pair<HifiSockAddr, ConnectionStats::Stats>>;
|
||||||
|
|
||||||
Socket(QObject* object = 0);
|
Socket(QObject* object = 0, bool shouldChangeSocketOptions = true);
|
||||||
|
|
||||||
quint16 localPort() const { return _udpSocket.localPort(); }
|
quint16 localPort() const { return _udpSocket.localPort(); }
|
||||||
|
|
||||||
|
@ -139,6 +139,8 @@ private:
|
||||||
int _maxBandwidth { -1 };
|
int _maxBandwidth { -1 };
|
||||||
|
|
||||||
std::unique_ptr<CongestionControlVirtualFactory> _ccFactory { new CongestionControlFactory<TCPVegasCC>() };
|
std::unique_ptr<CongestionControlVirtualFactory> _ccFactory { new CongestionControlFactory<TCPVegasCC>() };
|
||||||
|
|
||||||
|
bool _shouldChangeSocketOptions { true };
|
||||||
|
|
||||||
friend UDTTest;
|
friend UDTTest;
|
||||||
};
|
};
|
||||||
|
|
|
@ -16,6 +16,8 @@
|
||||||
Script.include("controllerDisplay.js");
|
Script.include("controllerDisplay.js");
|
||||||
Script.include("viveControllerConfiguration.js");
|
Script.include("viveControllerConfiguration.js");
|
||||||
|
|
||||||
|
var HIDE_CONTROLLERS_ON_EQUIP = false;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Management of controller display
|
// Management of controller display
|
||||||
//
|
//
|
||||||
|
@ -116,12 +118,14 @@ ControllerDisplayManager = function() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (channel === 'Hifi-Object-Manipulation') {
|
} else if (channel === 'Hifi-Object-Manipulation') {
|
||||||
data = JSON.parse(message);
|
if (HIDE_CONTROLLERS_ON_EQUIP) {
|
||||||
visible = data.action !== 'equip';
|
data = JSON.parse(message);
|
||||||
if (data.joint === "LeftHand") {
|
visible = data.action !== 'equip';
|
||||||
self.setLeftVisible(visible);
|
if (data.joint === "LeftHand") {
|
||||||
} else if (data.joint === "RightHand") {
|
self.setLeftVisible(visible);
|
||||||
self.setRightVisible(visible);
|
} else if (data.joint === "RightHand") {
|
||||||
|
self.setRightVisible(visible);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,7 +42,7 @@ const appIcon = path.join(__dirname, '../resources/console.png');
|
||||||
const DELETE_LOG_FILES_OLDER_THAN_X_SECONDS = 60 * 60 * 24 * 7; // 7 Days
|
const DELETE_LOG_FILES_OLDER_THAN_X_SECONDS = 60 * 60 * 24 * 7; // 7 Days
|
||||||
const LOG_FILE_REGEX = /(domain-server|ac-monitor|ac)-.*-std(out|err).txt/;
|
const LOG_FILE_REGEX = /(domain-server|ac-monitor|ac)-.*-std(out|err).txt/;
|
||||||
|
|
||||||
const HOME_CONTENT_URL = "http://cachefly.highfidelity.com/home-tutorial-9.tar.gz";
|
const HOME_CONTENT_URL = "http://cachefly.highfidelity.com/home-tutorial-release-5572.tar.gz";
|
||||||
|
|
||||||
function getBuildInfo() {
|
function getBuildInfo() {
|
||||||
var buildInfoPath = null;
|
var buildInfoPath = null;
|
||||||
|
|
Loading…
Reference in a new issue