diff options
Diffstat (limited to '')
-rw-r--r-- | include/network/Network.hpp (renamed from src/network/Network.hpp) | 0 | ||||
-rw-r--r-- | include/network/NetworkClient.hpp (renamed from src/network/NetworkClient.hpp) | 3 | ||||
-rw-r--r-- | include/network/Packet.hpp (renamed from src/network/Packet.hpp) | 3 | ||||
-rw-r--r-- | include/network/Socket.hpp (renamed from src/network/Socket.hpp) | 1 | ||||
-rw-r--r-- | include/network/Stream.hpp (renamed from src/network/Stream.hpp) | 18 |
5 files changed, 10 insertions, 15 deletions
diff --git a/src/network/Network.hpp b/include/network/Network.hpp index 1281289..1281289 100644 --- a/src/network/Network.hpp +++ b/include/network/Network.hpp diff --git a/src/network/NetworkClient.hpp b/include/network/NetworkClient.hpp index bf7aa4e..22b1b22 100644 --- a/src/network/NetworkClient.hpp +++ b/include/network/NetworkClient.hpp @@ -3,7 +3,8 @@ #include <thread> #include <queue> #include <mutex> -#include "Network.hpp" + +#include <network/Network.hpp> class NetworkClient { Network network; diff --git a/src/network/Packet.hpp b/include/network/Packet.hpp index 3cf4d26..685e3da 100644 --- a/src/network/Packet.hpp +++ b/include/network/Packet.hpp @@ -1,7 +1,8 @@ #pragma once #include <easylogging++.h> -#include "Stream.hpp" + +#include <network/Stream.hpp> enum PacketNameLoginSB { LoginStart = 0x00, diff --git a/src/network/Socket.hpp b/include/network/Socket.hpp index ee449b3..48bcad9 100644 --- a/src/network/Socket.hpp +++ b/include/network/Socket.hpp @@ -1,6 +1,7 @@ #pragma once #include <string> + #include <SFML/Network.hpp> /** diff --git a/src/network/Stream.hpp b/include/network/Stream.hpp index 5babb08..a24dfbe 100644 --- a/src/network/Stream.hpp +++ b/include/network/Stream.hpp @@ -5,23 +5,15 @@ #include <stdexcept> #include <vector> #include <cstring> + #include <nlohmann/json.hpp> #include <easylogging++.h> -#include "Socket.hpp" -#include "../utility/Vector.hpp" - -class Stream { -protected: - template<class T> - void endswap(T &obj) { - unsigned char *raw = reinterpret_cast<unsigned char *>(&obj); - std::reverse(raw, raw + sizeof(T)); - } - void endswap(unsigned char *arr, size_t arrLen) { - std::reverse(arr, arr + arrLen); - } +#include <network/Socket.hpp> +#include <Vector.hpp> +#include <Utility.hpp> +class Stream { public: virtual ~Stream() {}; }; |