windows/datapath: Windows implementation

This commit is contained in:
Michael Fabian 'Xaymar' Dirks
2019-04-11 01:43:17 +02:00
parent 1c0747bf98
commit 4bdcf51c54
2 changed files with 1 additions and 11 deletions
+1 -1
View File
@@ -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"
@@ -17,26 +17,16 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "datapath.hpp"
#if defined(_WIN32)
#include "windows/server.hpp"
#include "windows/socket.hpp"
#endif
datapath::error datapath::connect(std::shared_ptr<datapath::isocket>& 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<datapath::iserver>& 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
}