Reimplementd IX with OpenSSL

This commit is contained in:
2022-09-05 01:41:09 +02:00
parent 5e80c41538
commit 71656e4a66
214 changed files with 44919 additions and 99 deletions
+4 -5
View File
@@ -1,4 +1,4 @@
file(GLOB socket CONFIGURE_DEPENDS ${CMAKE_SOURCE_DIR}/socket/*.cpp)
file(GLOB socket CONFIGURE_DEPENDS ${CMAKE_SOURCE_DIR}/websocket/*.cpp)
file(GLOB file CONFIGURE_DEPENDS ${CMAKE_SOURCE_DIR}/file/*.cpp)
add_library(germanairlinesva_xplugin SHARED
@@ -8,8 +8,9 @@ add_library(germanairlinesva_xplugin SHARED
)
target_include_directories(germanairlinesva_xplugin PRIVATE
${CMAKE_SOURCE_DIR}/ixwebsocket/include
${CMAKE_SOURCE_DIR}/makerwysxp/include
${CMAKE_SOURCE_DIR}/socket/include
${CMAKE_SOURCE_DIR}/websocket/include
${CMAKE_SOURCE_DIR}/utilities/include
${CMAKE_SOURCE_DIR}/nlohmann/include
${CMAKE_SOURCE_DIR}/XPSDK/CHeaders
@@ -66,7 +67,6 @@ if(APPLE)
)
target_link_libraries(germanairlinesva_xplugin PRIVATE
${CMAKE_SOURCE_DIR}/XPSDK/Libraries/Mac/XPLM.framework/XPLM
"-framework Security"
)
elseif(UNIX)
message("Building for Linux ${BIT} into ${PROJECT_BINARY_DIR}/Plugin/${PLUGIN_NAME}/${BIT}")
@@ -92,7 +92,6 @@ elseif(UNIX)
)
endif()
target_link_libraries(germanairlinesva_xplugin PRIVATE
crypto
pthread
)
elseif(WIN32)
@@ -119,7 +118,6 @@ elseif(WIN32)
-static-libstdc++
)
target_link_libraries(germanairlinesva_xplugin PRIVATE
ws2_32.lib
)
if(BIT STREQUAL "32")
target_link_libraries(germanairlinesva_xplugin PRIVATE
@@ -137,4 +135,5 @@ endif()
target_link_libraries(germanairlinesva_xplugin PRIVATE
makerwysxp
ixwebsocket
)
+1 -1
View File
@@ -5,7 +5,7 @@
#include "makeRwysXP.h"
#include "recordingPath.hpp"
#include "simulatorDatabase.hpp"
#include "socket.h"
#include "websocket.h"
#include "XPLM/XPLMDataAccess.h"
#include "XPLM/XPLMGraphics.h"
+9 -9
View File
@@ -12,7 +12,7 @@ std::atomic<bool> wantsExit;
std::map<std::string, std::string> configuration;
Socket *connector;
Websocket *connector;
/* Datarefs */
XPLMDataRef pauseIndicator;
@@ -107,20 +107,20 @@ PLUGIN_API int XPluginStart(char *outName, char *outSig, char *outDesc)
roll = XPLMFindDataRef("sim/flightmodel/position/phi"); // FLOAT
quaternion = XPLMFindDataRef("sim/flightmodel/position/q"); // FLOAT[4]
// Initialize connector
configuration =
config::readConfig("Resources/plugins/GAConnector/config.cfg");
toLog("Config loaded");
try {
connector =
new Socket("https://wsecho.hofmannnet.myhome-server.de/client", toLog);
connector = new Websocket("wss://ws.hofmannnet.myhome-server.de:8000",
configuration["user"],
toLog);
} catch (const std::invalid_argument &e) {
toLog(e.what());
return 0;
}
toLog("WebSocket started");
configuration =
config::readConfig("Resources/plugins/GAConnector/config.cfg");
toLog("Config loaded");
char hash[2 * MD5LEN + 1] = "";
if (util::generateMD5("Custom Scenery/scenery_packs.ini", hash, toLog) == 0) {
std::map<std::string, std::pair<std::vector<Gate>, std::vector<Runway>>>
@@ -238,7 +238,7 @@ void serverWorker()
connector->sendData(copy);
std::this_thread::sleep_for(std::chrono::milliseconds(50));
std::this_thread::sleep_for(std::chrono::milliseconds(250));
}
}