diff --git a/Common/Cpp/Sockets/ServerSocket.h b/Common/Cpp/Sockets/ServerSocket.h new file mode 100644 index 0000000000..643080340f --- /dev/null +++ b/Common/Cpp/Sockets/ServerSocket.h @@ -0,0 +1,31 @@ +/* Server Socket + * + * From: https://github.com/PokemonAutomation/ + * + * The default AbstractServerSocket backend for the current platform, + * mirroring "ClientSocket.h". The Qt backend (ServerSocket_Qt) exists + * for callers that need to integrate with a Qt event loop; it is not + * the default. + * + */ + +#ifndef PokemonAutomation_ServerSocket_H +#define PokemonAutomation_ServerSocket_H + + + +#ifdef _WIN32 +#include "ServerSocket_WinSocket.h" +namespace PokemonAutomation{ + using ServerSocket = ServerSocket_WinSocket; +} +#else +#include "ServerSocket_POSIX.h" +namespace PokemonAutomation{ + using ServerSocket = ServerSocket_POSIX; +} +#endif + + + +#endif diff --git a/SerialPrograms/cmake/SourceFiles.cmake b/SerialPrograms/cmake/SourceFiles.cmake index f8077299f9..f71bb0f96c 100644 --- a/SerialPrograms/cmake/SourceFiles.cmake +++ b/SerialPrograms/cmake/SourceFiles.cmake @@ -416,6 +416,7 @@ file(GLOB LIBRARY_SOURCES ../Common/Cpp/Sockets/ServerSocket_POSIX.h ../Common/Cpp/Sockets/ServerSocket_WinSocket.h ../Common/Cpp/Sockets/ServerSocket_Qt.h + ../Common/Cpp/Sockets/ServerSocket.h ../Common/Cpp/Sockets/Sockets_Tests.cpp ../Common/Cpp/Sockets/Sockets_Tests.h ../Common/Cpp/StreamConnections/MockDevice.cpp