disconnect() -> disconnect_from_client()

This commit is contained in:
Andreas Tsouchlos 2025-04-19 14:39:14 +02:00
parent b22150de94
commit 440837cdbc
3 changed files with 4 additions and 4 deletions

View File

@ -50,6 +50,6 @@ int main() {
spdlog::info("Sent {} bytes", sendRes.value()); spdlog::info("Sent {} bytes", sendRes.value());
} }
server.disconnect(); server.disconnect_from_client();
} }
} }

View File

@ -99,7 +99,7 @@ bool NonBlockingServer::next_client_available() {
} }
[[nodiscard]] std::expected<void, int> NonBlockingServer::accept_next_client() { [[nodiscard]] std::expected<void, int> NonBlockingServer::accept_next_client() {
disconnect(); disconnect_from_client();
socklen_t clientAddrLen = sizeof(m_clientAddress); socklen_t clientAddrLen = sizeof(m_clientAddress);
@ -113,7 +113,7 @@ bool NonBlockingServer::next_client_available() {
return {}; return {};
} }
void NonBlockingServer::disconnect() { void NonBlockingServer::disconnect_from_client() {
close_client_socket(); close_client_socket();
} }

View File

@ -39,7 +39,7 @@ public:
bool next_client_available(); bool next_client_available();
[[nodiscard]] std::expected<void, int> accept_next_client(); [[nodiscard]] std::expected<void, int> accept_next_client();
void disconnect(); void disconnect_from_client();
[[nodiscard]] std::expected<std::array<char, 16>, int> [[nodiscard]] std::expected<std::array<char, 16>, int>
get_client_ip_as_string(); get_client_ip_as_string();