Add port and hostname config options

Signed-off-by: Schmarni <marnistromer@gmail.com>
This commit is contained in:
Schmarni
2026-02-26 15:00:39 +01:00
committed by xytovl
parent 0f21191e9b
commit 1e6937d4a4
8 changed files with 76 additions and 6 deletions
+6
View File
@@ -204,6 +204,12 @@ configuration::configuration()
if (auto it = json.find("tcp-only"); it != json.end())
tcp_only = *it;
if (auto it = json.find("port"); it != json.end())
port = *it;
if (auto it = json.find("hostname"); it != json.end())
hostname = *it;
if (auto it = json.find("publish-service"); it != json.end())
{
publication = *it;
+4
View File
@@ -19,6 +19,8 @@
#pragma once
#include "hostname.h"
#include "wivrn_config.h"
#include <array>
#include <chrono>
#include <filesystem>
@@ -57,6 +59,8 @@ struct configuration
bool use_steamvr_lh = false;
bool hid_forwarding = false;
bool tcp_only = false;
int port = wivrn::default_port;
std::string hostname = wivrn::hostname();
service_publication publication = service_publication::avahi;
// monostate: default value, string: user defined, nullptr: disabled