diff --git a/CMakeLists.txt b/CMakeLists.txt index 0328f9ee1d..dd94eddf1e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,4 +21,3 @@ add_subdirectory(injector) add_subdirectory(pairing-server) add_subdirectory(space-server) add_subdirectory(voxel-edit) -add_subdirectory(voxel-server) \ No newline at end of file diff --git a/libraries/voxel-server-library/src/VoxelServer.cpp b/libraries/voxel-server-library/src/VoxelServer.cpp index f9f61d1a35..0cd67a6856 100644 --- a/libraries/voxel-server-library/src/VoxelServer.cpp +++ b/libraries/voxel-server-library/src/VoxelServer.cpp @@ -52,7 +52,6 @@ VoxelServer::VoxelServer(Assignment::Command command, Assignment::Location locat _serverTree(true) { _argc = 0; _argv = NULL; - _dontKillOnMissingDomain = false; _packetsPerClientPerInterval = 10; _wantVoxelPersist = true; @@ -75,7 +74,6 @@ VoxelServer::VoxelServer(const unsigned char* dataBuffer, int numBytes) : Assign _serverTree(true) { _argc = 0; _argv = NULL; - _dontKillOnMissingDomain = false; _packetsPerClientPerInterval = 10; _wantVoxelPersist = true; @@ -167,25 +165,6 @@ void VoxelServer::parsePayload() { } } -void VoxelServer::setupStandAlone(const char* domain, int port) { - NodeList::createInstance(NODE_TYPE_VOXEL_SERVER, port); - - // Handle Local Domain testing with the --local command line - const char* local = "--local"; - _wantLocalDomain = strcmp(domain, local) == 0; - if (_wantLocalDomain) { - qDebug("Local Domain MODE!\n"); - NodeList::getInstance()->setDomainIPToLocalhost(); - } else { - if (domain) { - NodeList::getInstance()->setDomainHostname(domain); - } - } - - // If we're running in standalone mode, we don't want to kill ourselves when we haven't heard from a domain - _dontKillOnMissingDomain = true; -} - //int main(int argc, const char * argv[]) { void VoxelServer::run() { @@ -372,8 +351,7 @@ void VoxelServer::run() { // loop to send to nodes requesting data while (true) { - if (!_dontKillOnMissingDomain && - NodeList::getInstance()->getNumNoReplyDomainCheckIns() == MAX_SILENT_DOMAIN_SERVER_CHECK_INS) { + if (NodeList::getInstance()->getNumNoReplyDomainCheckIns() == MAX_SILENT_DOMAIN_SERVER_CHECK_INS) { break; } diff --git a/libraries/voxel-server-library/src/VoxelServer.h b/libraries/voxel-server-library/src/VoxelServer.h index 8ab18d8c46..776ce0cd1e 100644 --- a/libraries/voxel-server-library/src/VoxelServer.h +++ b/libraries/voxel-server-library/src/VoxelServer.h @@ -35,13 +35,6 @@ public: /// allows setting of run arguments void setArguments(int argc, char** argv); - /// when VoxelServer class is used by voxel-server stand alone executable it calls this to specify the domain - /// and port it is handling. When called by assignment-client, this is not needed because assignment-client - /// handles ports and domains automatically. - /// \param const char* domain domain name, IP address, or local to specify the domain the voxel server is serving - /// \param int port port the voxel server will listen on - void setupStandAlone(const char* domain, int port); - bool wantsDebugVoxelSending() const { return _debugVoxelSending; } bool wantsDebugVoxelReceiving() const { return _debugVoxelReceiving; } bool wantShowAnimationDebug() const { return _shouldShowAnimationDebug; } @@ -64,7 +57,6 @@ private: int _argc; const char** _argv; char** _parsedArgV; - bool _dontKillOnMissingDomain; char _voxelPersistFilename[MAX_FILENAME_LENGTH]; int _packetsPerClientPerInterval; diff --git a/voxel-server/CMakeLists.txt b/voxel-server/CMakeLists.txt deleted file mode 100644 index f759db0d89..0000000000 --- a/voxel-server/CMakeLists.txt +++ /dev/null @@ -1,30 +0,0 @@ -cmake_minimum_required(VERSION 2.8) - -set(TARGET_NAME voxel-server) - -set(ROOT_DIR ..) -set(MACRO_DIR ${ROOT_DIR}/cmake/macros) - -# setup for find modules -set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/../cmake/modules/") - -# set up the external glm library -include(${MACRO_DIR}/IncludeGLM.cmake) -include_glm(${TARGET_NAME} ${ROOT_DIR}) - -include(${MACRO_DIR}/SetupHifiProject.cmake) - -setup_hifi_project(${TARGET_NAME} TRUE) - -# link in the shared library -include(${MACRO_DIR}/LinkHifiLibrary.cmake) -link_hifi_library(shared ${TARGET_NAME} ${ROOT_DIR}) - -# link in the hifi voxels library -link_hifi_library(voxels ${TARGET_NAME} ${ROOT_DIR}) - -# link in the hifi avatars library -link_hifi_library(avatars ${TARGET_NAME} ${ROOT_DIR}) - -# link in the hifi voxel-server-library -link_hifi_library(voxel-server-library ${TARGET_NAME} ${ROOT_DIR}) diff --git a/voxel-server/resources/voxels.hio2 b/voxel-server/resources/voxels.hio2 deleted file mode 100644 index 77d51228ce..0000000000 Binary files a/voxel-server/resources/voxels.hio2 and /dev/null differ diff --git a/voxel-server/src/README b/voxel-server/src/README deleted file mode 100644 index 76ed051679..0000000000 --- a/voxel-server/src/README +++ /dev/null @@ -1,86 +0,0 @@ -NAME - voxel-server - the High Fidelity Voxel Server - -SYNOPSIS - voxel-server [--local] [--jurisdictionFile ] [--port ] [--voxelsPersistFilename ] - [--displayVoxelStats] [--debugVoxelSending] [--debugVoxelReceiving] [--shouldShowAnimationDebug] - [--wantColorRandomizer] [--NoVoxelPersist] [--packetsPerSecond ] - [--AddRandomVoxels] [--AddScene] [--NoAddScene] - -DESCRIPTION - voxel-server is a compact, portable, scalable, distributed sparse voxel octree server - -OPTIONS - - --local - This will run the voxel server in "local domain mode" and will look for a domain-server running on the same IP - address as the voxel server - - --jurisdictionRoot [hex string of root octcode] - Tells the server to honor jurisdiction from the specified root node and below - - --jurisdictionEndNodes [(<,octcode>...)] - Tells the server to honor jurisdiction from the root down to the octcodes included in the comma separated list - - --jurisdictionFile [filename] - Tells the server to load it's jurisdiction from the specified file. When a voxel server is running with a limited - "jurisdiction" it will only server voxels from that portion of the voxel tree. The jurisdiction file is a ".ini" style - file with the following options: [General/root] specifies the octal code for the node in the tree that this server will - use as it's "root". It will only server voxels under this root. [endNodes/...] a list or group of additional octalcodes - under the root, which will not be served. - - The following example jurisdiction file will server all voxels from the root and below, and exclude voxels from the - voxel of scale 0.25 and 0,0,0. - - ****** example jurisdiction.ini ********************************************************************** - [General] - root=00 - - [endNodes] - endnode0=0200 - - ****************************************************************************************************** - - - --port [port] - Specify the port the voxel-server will listen on. You must specify different ports to enable multiple voxel servers - running on a single machine. - - --voxelsPersistFilename [filename] - Specify and alternate file that the voxel server will read and write persistant voxels to. By default the voxel server - will use one of the following files: - - default: /etc/highfidelity/voxel-server/resources/voxels.svo - in local mode: ./resources/voxels.svo - - --displayVoxelStats - Displays additional voxel stats debugging - - --debugVoxelSending - Displays additional voxel sending debugging - - --debugVoxelReceiving - Displays additional voxel receiving debugging - - --shouldShowAnimationDebug - Displays additional verbose animation debugging - - --wantColorRandomizer - Adds color randomization to inserts into the local voxel tree - - --NoVoxelPersist - Disables voxel persisting - - --packetsPerSecond [value] - Specifies the packets per second that this voxel server will send to attached clients - - --AddRandomVoxels - Add random voxels to the surface on startup - - --AddScene - OBSOLETE: Adds an arbitrary scene with several "planet" spheres - - --NoAddScene - OBSOLETE: disables adding of scene - - \ No newline at end of file diff --git a/voxel-server/src/main.cpp b/voxel-server/src/main.cpp deleted file mode 100644 index ac9e39e634..0000000000 --- a/voxel-server/src/main.cpp +++ /dev/null @@ -1,47 +0,0 @@ -// -// main.cpp -// Voxel Server -// -// Created by Stephen Birarda on 03/06/13. -// Copyright (c) 2012 High Fidelity, Inc. All rights reserved. -// - -#include -#include -const int VOXEL_LISTEN_PORT = 40106; - - -int main(int argc, const char * argv[]) { - - // Handle Local Domain testing with the --local command line - const char* local = "--local"; - bool wantLocalDomain = cmdOptionExists(argc, argv, local); - const char* domainIP = getCmdOption(argc, argv, "--domain"); - - int listenPort = VOXEL_LISTEN_PORT; - // Check to see if the user passed in a command line option for setting listen port - const char* PORT_PARAMETER = "--port"; - const char* portParameter = getCmdOption(argc, argv, PORT_PARAMETER); - if (portParameter) { - listenPort = atoi(portParameter); - if (listenPort < 1) { - listenPort = VOXEL_LISTEN_PORT; - } - printf("portParameter=%s listenPort=%d\n", portParameter, listenPort); - } - - VoxelServer ourVoxelServer(Assignment::CreateCommand); - - if (wantLocalDomain) { - ourVoxelServer.setupStandAlone(local, listenPort); - } else { - if (domainIP) { - ourVoxelServer.setupStandAlone(domainIP, listenPort); - } - } - - ourVoxelServer.setArguments(argc, const_cast(argv)); - ourVoxelServer.run(); -} - -