summaryrefslogtreecommitdiffstats
path: root/Network.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'Network.hpp')
-rw-r--r--Network.hpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/Network.hpp b/Network.hpp
new file mode 100644
index 0000000..a135fbe
--- /dev/null
+++ b/Network.hpp
@@ -0,0 +1,26 @@
+#pragma once
+
+#include <string>
+#include <SFML/Network.hpp>
+#include "Packet.hpp"
+
+
+class Network {
+public:
+ Network(std::string address, unsigned short port);
+
+ ~Network();
+
+ void SendHandshake(std::string username);
+
+ void SendPacket(Packet &packet);
+
+ Packet ReceivePacket();
+
+private:
+ std::string m_address;
+ unsigned short m_port;
+ sf::TcpSocket m_socket;
+ bool m_isCommpress;
+};
+