mirror of
https://github.com/thunderbrewhq/thunderbrew
synced 2025-04-18 02:52:47 +03:00
chore(net): restructure system-specific socket code
This commit is contained in:
parent
da23578002
commit
b537c34990
@ -1,4 +1,24 @@
|
|||||||
file(GLOB PRIVATE_SOURCES "*.cpp" "connection/*.cpp" "grunt/*.cpp" "login/*.cpp" "srp/*.cpp")
|
file(GLOB PRIVATE_SOURCES
|
||||||
|
"*.cpp"
|
||||||
|
"connection/*.cpp"
|
||||||
|
"grunt/*.cpp"
|
||||||
|
"login/*.cpp"
|
||||||
|
"srp/*.cpp"
|
||||||
|
)
|
||||||
|
|
||||||
|
if(WHOA_SYSTEM_WIN)
|
||||||
|
file(GLOB WINSOCK_SOURCES
|
||||||
|
"connection/winsock/*.cpp"
|
||||||
|
)
|
||||||
|
list(APPEND PRIVATE_SOURCES ${WINSOCK_SOURCES})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(WHOA_SYSTEM_MAC OR WHOA_SYSTEM_LINUX)
|
||||||
|
file(GLOB BSD_SOURCES
|
||||||
|
"connection/bsd/*.cpp"
|
||||||
|
)
|
||||||
|
list(APPEND PRIVATE_SOURCES ${BSD_SOURCES})
|
||||||
|
endif()
|
||||||
|
|
||||||
add_library(net STATIC
|
add_library(net STATIC
|
||||||
${PRIVATE_SOURCES}
|
${PRIVATE_SOURCES}
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
#if defined(WHOA_SYSTEM_MAC) || defined(WHOA_SYSTEM_LINUX)
|
|
||||||
|
|
||||||
#include "net/connection/WowConnectionNet.hpp"
|
#include "net/connection/WowConnectionNet.hpp"
|
||||||
#include "net/connection/WowConnection.hpp"
|
#include "net/connection/WowConnection.hpp"
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
@ -187,5 +185,3 @@ void WowConnectionNet::PlatformWorkerReady() {
|
|||||||
char buf = '\1';
|
char buf = '\1';
|
||||||
write(s_workerPipe[1], &buf, sizeof(buf));
|
write(s_workerPipe[1], &buf, sizeof(buf));
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
@ -1,5 +1,3 @@
|
|||||||
#if defined(WHOA_SYSTEM_WIN)
|
|
||||||
|
|
||||||
#include "net/connection/WowConnectionNet.hpp"
|
#include "net/connection/WowConnectionNet.hpp"
|
||||||
|
|
||||||
void WowConnectionNet::PlatformAdd(WowConnection* connection) {
|
void WowConnectionNet::PlatformAdd(WowConnection* connection) {
|
||||||
@ -25,5 +23,3 @@ void WowConnectionNet::PlatformRun() {
|
|||||||
void WowConnectionNet::PlatformWorkerReady() {
|
void WowConnectionNet::PlatformWorkerReady() {
|
||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
Loading…
Reference in New Issue
Block a user