X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fnet%2FClient.hpp;fp=src%2Fnet%2FClient.hpp;h=0000000000000000000000000000000000000000;hb=8ae45b6555d55f301f83daf8c1337d332d8305ab;hp=2848aedb342a37ebcac5ebd8c7052089c0696397;hpb=7fd76e64de47f564117b9e6f73f1482d93842108;p=blank.git diff --git a/src/net/Client.hpp b/src/net/Client.hpp deleted file mode 100644 index 2848aed..0000000 --- a/src/net/Client.hpp +++ /dev/null @@ -1,50 +0,0 @@ -#ifndef BLANK_NET_CLIENT_HPP_ -#define BLANK_NET_CLIENT_HPP_ - -#include "Connection.hpp" - -#include -#include - - -namespace blank { - -class World; - -class Client { - -public: - struct Config { - std::string host = "localhost"; - Uint16 port = 12354; - }; - -public: - explicit Client(const Config &); - ~Client(); - - void Handle(); - - void Update(int dt); - - Connection &GetConnection() noexcept { return conn; } - const Connection &GetConnection() const noexcept { return conn; } - - std::uint16_t SendPing(); - std::uint16_t SendLogin(const std::string &); - std::uint16_t SendPart(); - std::uint16_t SendPlayerUpdate(const Entity &); - -private: - void HandlePacket(const UDPpacket &); - -private: - Connection conn; - UDPsocket client_sock; - UDPpacket client_pack; - -}; - -} - -#endif