[fix] apply settings without reconnecting signaling

This commit is contained in:
dijunkun
2026-10-09 10:01:34 +08:00
parent dacdbc5c45
commit 4d65d12add
5 changed files with 67 additions and 4 deletions
@@ -0,0 +1,29 @@
/*
* @Author: DI JUNKUN
* @Date: 2026-10-09
* Copyright (c) 2026 by DI JUNKUN, All Rights Reserved.
*/
#ifndef _SIGNAL_SERVER_SETTINGS_H_
#define _SIGNAL_SERVER_SETTINGS_H_
#include <tuple>
#include "config_center.h"
namespace crossdesk {
// Include the identity namespace as well as the effective endpoint. Editing
// an inactive self-hosted endpoint must not disconnect the public server.
inline auto GetSignalServerSettings(const ConfigCenter& config) {
const bool self_hosted = config.IsSelfHosted();
return std::make_tuple(
self_hosted,
self_hosted ? config.GetSignalServerHost() : config.GetDefaultServerHost(),
self_hosted ? config.GetSignalServerPort()
: config.GetDefaultSignalServerPort());
}
} // namespace crossdesk
#endif