From 440837cdbc7e2f6adc584d92a253daae4afb8bfe Mon Sep 17 00:00:00 2001 From: Andreas Tsouchlos Date: Sat, 19 Apr 2025 14:39:14 +0200 Subject: [PATCH] disconnect() -> disconnect_from_client() --- src/main.cpp | 2 +- src/tcp.cpp | 4 ++-- src/tcp.hpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index d24847f..a0a6e02 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -50,6 +50,6 @@ int main() { spdlog::info("Sent {} bytes", sendRes.value()); } - server.disconnect(); + server.disconnect_from_client(); } } diff --git a/src/tcp.cpp b/src/tcp.cpp index 97fab16..b3ae5da 100644 --- a/src/tcp.cpp +++ b/src/tcp.cpp @@ -99,7 +99,7 @@ bool NonBlockingServer::next_client_available() { } [[nodiscard]] std::expected NonBlockingServer::accept_next_client() { - disconnect(); + disconnect_from_client(); socklen_t clientAddrLen = sizeof(m_clientAddress); @@ -113,7 +113,7 @@ bool NonBlockingServer::next_client_available() { return {}; } -void NonBlockingServer::disconnect() { +void NonBlockingServer::disconnect_from_client() { close_client_socket(); } diff --git a/src/tcp.hpp b/src/tcp.hpp index 4b8811e..e14bc01 100644 --- a/src/tcp.hpp +++ b/src/tcp.hpp @@ -39,7 +39,7 @@ public: bool next_client_available(); [[nodiscard]] std::expected accept_next_client(); - void disconnect(); + void disconnect_from_client(); [[nodiscard]] std::expected, int> get_client_ip_as_string();