diff options
author | LaG1924 <12997935+LaG1924@users.noreply.github.com> | 2017-06-21 16:26:25 +0200 |
---|---|---|
committer | LaG1924 <12997935+LaG1924@users.noreply.github.com> | 2017-06-21 16:26:25 +0200 |
commit | f5aa7827af55342a1ec714d366944b3e3f3129b2 (patch) | |
tree | 4f4885d2ae0f46004a22e7d4dc34f80c11ecee0c /include/network | |
parent | 2017-06-20 (diff) | |
download | AltCraft-f5aa7827af55342a1ec714d366944b3e3f3129b2.tar AltCraft-f5aa7827af55342a1ec714d366944b3e3f3129b2.tar.gz AltCraft-f5aa7827af55342a1ec714d366944b3e3f3129b2.tar.bz2 AltCraft-f5aa7827af55342a1ec714d366944b3e3f3129b2.tar.lz AltCraft-f5aa7827af55342a1ec714d366944b3e3f3129b2.tar.xz AltCraft-f5aa7827af55342a1ec714d366944b3e3f3129b2.tar.zst AltCraft-f5aa7827af55342a1ec714d366944b3e3f3129b2.zip |
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() {}; }; |