summaryrefslogtreecommitdiff
path: root/minion/src/network_connection.hpp
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2022-05-14 12:57:01 +0200
committerHampusM <hampus@hampusmat.com>2022-05-14 12:57:01 +0200
commit39e2964b0315faeac0c9f8431334ba10093b9490 (patch)
tree9cae9425845b32eac5c0b5c1e93601f09e718a21 /minion/src/network_connection.hpp
parentcd00813c0740930d389f935f0c2d7d8a11eef02d (diff)
refactor(minion): create network connection class
Diffstat (limited to 'minion/src/network_connection.hpp')
-rw-r--r--minion/src/network_connection.hpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/minion/src/network_connection.hpp b/minion/src/network_connection.hpp
new file mode 100644
index 0000000..89094b8
--- /dev/null
+++ b/minion/src/network_connection.hpp
@@ -0,0 +1,19 @@
+#pragma once
+
+#include <stdint.h>
+
+class NetworkConnection
+{
+public:
+ NetworkConnection(int8_t id) noexcept;
+
+ int8_t id() const noexcept;
+
+ bool is_closed() const noexcept;
+
+ void set_is_closed(bool is_closed) noexcept;
+
+private:
+ const int8_t _id;
+ bool _is_closed;
+};