diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7fbcc25..5e5e7e1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -138,7 +138,6 @@ set(PROJECT_DATA
# Private (only compiled/used locally)
set(PROJECT_PRIVATE
- "source/datapath.cpp"
)
# Libraries
@@ -203,6 +202,7 @@ if(WIN32)
)
list(APPEND PROJECT_PRIVATE
+ "source/windows/datapath.cpp"
"source/windows/overlapped.hpp"
"source/windows/overlapped.cpp"
"source/windows/socket.hpp"
diff --git a/source/datapath.cpp b/source/windows/datapath.cpp
similarity index 88%
rename from source/datapath.cpp
rename to source/windows/datapath.cpp
index 2ffd607..d8dcca5 100644
--- a/source/datapath.cpp
+++ b/source/windows/datapath.cpp
@@ -17,26 +17,16 @@ along with this program. If not, see .
*/
#include "datapath.hpp"
-#if defined(_WIN32)
#include "windows/server.hpp"
#include "windows/socket.hpp"
-#endif
datapath::error datapath::connect(std::shared_ptr& socket, std::string path)
{
-#if defined(_WIN32)
return datapath::windows::socket::connect(socket, path);
-#else
- return datapath::error::Unknown;
-#endif
}
datapath::error datapath::host(std::shared_ptr& server, std::string path,
datapath::permissions permissions, size_t max_clients)
{
-#if defined(_WIN32)
return datapath::windows::server::host(server, path, permissions, max_clients);
-#else
- return datapath::error::Unknown;
-#endif
}