Adjust rehosting with automatic server

This commit is contained in:
Lars Toenning
2023-03-01 16:39:50 +01:00
parent c4cfdc1fcc
commit acf8df95a6
2 changed files with 62 additions and 30 deletions

View File

@@ -481,7 +481,7 @@ namespace BlackCore::Fsd
std::unique_ptr<QTcpSocket> m_socket = std::make_unique<QTcpSocket>(this); //!< used TCP socket, parent needed as it runs in worker thread
void connectSocketSignals();
bool m_rehosting = false;
void initiateConnection();
std::atomic_bool m_unitTestMode { false };
std::atomic_bool m_printToConsole { false };
@@ -558,6 +558,11 @@ namespace BlackCore::Fsd
ServerType m_serverType = ServerType::LegacyFsd;
Capabilities m_capabilities = Capabilities::None;
// Current rehosting
QTcpSocket* m_rehosting_socket = nullptr;
QString m_rehosting_host = "";
bool m_rehosting = false;
// buffered data for FSD
BlackMisc::Aviation::CCallsign m_ownCallsign; //!< "buffered callsign", as this must not change when connected
BlackMisc::Aviation::CCallsign m_partnerCallsign; //!< "buffered"callsign", of partner flying in shared cockpit