summaryrefslogtreecommitdiff
path: root/minion/src/network_connection.cpp
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.cpp
parentcd00813c0740930d389f935f0c2d7d8a11eef02d (diff)
refactor(minion): create network connection class
Diffstat (limited to 'minion/src/network_connection.cpp')
-rw-r--r--minion/src/network_connection.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/minion/src/network_connection.cpp b/minion/src/network_connection.cpp
new file mode 100644
index 0000000..1f5fdae
--- /dev/null
+++ b/minion/src/network_connection.cpp
@@ -0,0 +1,18 @@
+#include "network_connection.hpp"
+
+NetworkConnection::NetworkConnection(int8_t id) noexcept : _id(id), _is_closed(false) {}
+
+int8_t NetworkConnection::id() const noexcept
+{
+ return _id;
+}
+
+bool NetworkConnection::is_closed() const noexcept
+{
+ return _is_closed;
+}
+
+void NetworkConnection::set_is_closed(bool is_closed) noexcept
+{
+ _is_closed = is_closed;
+}