summaryrefslogtreecommitdiffstats
path: root/src/Network.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Network.hpp')
-rw-r--r--src/Network.hpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Network.hpp b/src/Network.hpp
index 5d7fc38..29a090f 100644
--- a/src/Network.hpp
+++ b/src/Network.hpp
@@ -11,12 +11,13 @@ enum ConnectionState : unsigned char {
};
class Network {
- Socket *socket = nullptr;
- StreamSocket *stream = nullptr;
+ std::unique_ptr<Socket> socket;
+ std::unique_ptr<StreamSocket> stream;
std::shared_ptr<Packet> ReceivePacketByPacketId(int packetId, ConnectionState state, StreamInput &stream);
public:
Network(std::string address, unsigned short port);
+
~Network();
std::shared_ptr<Packet> ReceivePacket(ConnectionState state = Play, bool useCompression = false);