From 39e2964b0315faeac0c9f8431334ba10093b9490 Mon Sep 17 00:00:00 2001 From: HampusM Date: Sat, 14 May 2022 12:57:01 +0200 Subject: refactor(minion): create network connection class --- minion/src/network_connection.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 minion/src/network_connection.cpp (limited to 'minion/src/network_connection.cpp') 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; +} -- cgit v1.2.3-18-g5258