mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-05-06 03:19:17 -05:00
Also set the socket type for the server connection correctly; Fix the broken spacetime component again
This commit is contained in:
@@ -348,10 +348,11 @@ void GuiSpaceTimeComponent::render() {
|
||||
openspace::TimeUnits.end(),
|
||||
std::string(""),
|
||||
[](const std::string& a, const openspace::TimeUnit& unit) {
|
||||
return fmt::format("{}{} / second\0", a, nameForTimeUnit(unit, true));
|
||||
return fmt::format(
|
||||
"{}{} / second", a, nameForTimeUnit(unit, true)
|
||||
) + '\0';
|
||||
}
|
||||
);
|
||||
|
||||
_firstFrame = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -177,10 +177,10 @@ ServerInterface::ServerInterface(const ghoul::Dictionary& config)
|
||||
|
||||
const std::string type = config.value<std::string>(TypeInfo.identifier);
|
||||
if (type == TcpSocketType) {
|
||||
_type = static_cast<int>(InterfaceType::TcpSocket);
|
||||
_socketType = static_cast<int>(InterfaceType::TcpSocket);
|
||||
}
|
||||
else if (type == WebSocketType) {
|
||||
_type = static_cast<int>(InterfaceType::WebSocket);
|
||||
_socketType = static_cast<int>(InterfaceType::WebSocket);
|
||||
}
|
||||
|
||||
if (config.hasValue<std::string>(PasswordInfo.identifier)) {
|
||||
@@ -220,12 +220,12 @@ void ServerInterface::initialize() {
|
||||
return;
|
||||
}
|
||||
switch (static_cast<InterfaceType>(_socketType.value())) {
|
||||
case InterfaceType::TcpSocket:
|
||||
_socketServer = std::make_unique<ghoul::io::TcpSocketServer>();
|
||||
break;
|
||||
case InterfaceType::WebSocket:
|
||||
_socketServer = std::make_unique<ghoul::io::WebSocketServer>();
|
||||
break;
|
||||
case InterfaceType::TcpSocket:
|
||||
_socketServer = std::make_unique<ghoul::io::TcpSocketServer>();
|
||||
break;
|
||||
case InterfaceType::WebSocket:
|
||||
_socketServer = std::make_unique<ghoul::io::WebSocketServer>();
|
||||
break;
|
||||
}
|
||||
_socketServer->listen(_port);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user