mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-04-10 08:12:08 +02:00
put back DS port numbers, remove magic IPv numbers
This commit is contained in:
parent
d412e0611d
commit
0262184c12
3 changed files with 7 additions and 4 deletions
|
@ -32,7 +32,7 @@
|
|||
#include "PacketHeaders.h"
|
||||
#include "SharedUtil.h"
|
||||
|
||||
const int DOMAIN_LISTEN_PORT = 39999;
|
||||
const int DOMAIN_LISTEN_PORT = 40102;
|
||||
unsigned char packetData[MAX_PACKET_SIZE];
|
||||
|
||||
const int NODE_COUNT_STAT_INTERVAL_MSECS = 5000;
|
||||
|
|
|
@ -12,6 +12,9 @@
|
|||
|
||||
#include "Assignment.h"
|
||||
|
||||
const char IPv4_ADDRESS_DESIGNATOR = 4;
|
||||
const char IPv6_ADDRESS_DESIGNATOR = 6;
|
||||
|
||||
Assignment::Assignment(Assignment::Direction direction, Assignment::Type type, const char* pool) :
|
||||
_direction(direction),
|
||||
_type(type),
|
||||
|
@ -63,7 +66,7 @@ Assignment::Assignment(const unsigned char* dataBuffer, int numBytes) :
|
|||
}
|
||||
|
||||
if (numBytes > numBytesRead) {
|
||||
if (dataBuffer[numBytesRead++] == 4) {
|
||||
if (dataBuffer[numBytesRead++] == IPv4_ADDRESS_DESIGNATOR) {
|
||||
// IPv4 address
|
||||
sockaddr_in destinationSocket = {};
|
||||
memcpy(&destinationSocket, dataBuffer + numBytesRead, sizeof(sockaddr_in));
|
||||
|
@ -100,7 +103,7 @@ int Assignment::packToBuffer(unsigned char* buffer) {
|
|||
}
|
||||
|
||||
if (_domainSocket) {
|
||||
buffer[numPackedBytes++] = (_domainSocket->sa_family == AF_INET) ? 4 : 6;
|
||||
buffer[numPackedBytes++] = (_domainSocket->sa_family == AF_INET) ? IPv4_ADDRESS_DESIGNATOR : IPv6_ADDRESS_DESIGNATOR;
|
||||
|
||||
int numSocketBytes = (_domainSocket->sa_family == AF_INET) ? sizeof(sockaddr_in) : sizeof(sockaddr_in6);
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ const char SOLO_NODE_TYPES[2] = {
|
|||
|
||||
const char DEFAULT_DOMAIN_HOSTNAME[MAX_HOSTNAME_BYTES] = "root.highfidelity.io";
|
||||
const char DEFAULT_DOMAIN_IP[INET_ADDRSTRLEN] = ""; // IP Address will be re-set by lookup on startup
|
||||
const int DEFAULT_DOMAINSERVER_PORT = 39999;
|
||||
const int DEFAULT_DOMAINSERVER_PORT = 40102;
|
||||
|
||||
bool silentNodeThreadStopFlag = false;
|
||||
bool pingUnknownNodeThreadStopFlag = false;
|
||||
|
|
Loading…
Reference in a new issue