MCPcopy Create free account
hub / github.com/OSVR/OSVR-Core / main

Function main

apps/osvr_server.cpp:50–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48}
49
50int main(int argc, char *argv[]) {
51 std::string configName(osvr::server::getDefaultConfigFilename());
52 if (argc > 1) {
53 configName = argv[1];
54 } else {
55 out << "Using default config file - pass a filename on the command "
56 "line to use a different one." << endl;
57 }
58
59 server = osvr::server::configureServerFromFile(configName);
60 if (!server) {
61 return -1;
62 }
63
64 out << "Registering shutdown handler..." << endl;
65 osvr::server::registerShutdownHandler<&handleShutdown>();
66
67 out << "Starting server mainloop..." << endl;
68 server->startAndAwaitShutdown();
69
70 out << "Server mainloop exited." << endl;
71
72 return 0;
73}

Callers

nothing calls this directly

Calls 3

getDefaultConfigFilenameFunction · 0.85
configureServerFromFileFunction · 0.85
startAndAwaitShutdownMethod · 0.45

Tested by

no test coverage detected