From 131dc244e67e3b6e9304e7076c397c761860044c Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Mon, 10 Mar 2025 18:36:00 +0800 Subject: fix(registerName): no longer allow same name the previous behaviour was it wouldn't broadcast the message to the same name debug: more logging, maybe we should disable TRACE by default in the future? WIP: partial impl of signal handling(SIGINT(keyboardinterrupt) etc) --- src/server.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/server.cpp') diff --git a/src/server.cpp b/src/server.cpp index cfe13c5..dbf48a7 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -2,6 +2,7 @@ #include #include #include +#include "log.hpp" CServer::CServer(uint16_t port) : m_sockfd(Hyprutils::OS::CFileDescriptor{socket(AF_INET, SOCK_STREAM, 0)}) { @@ -20,10 +21,13 @@ CServer::CServer(uint16_t port) listen(m_sockfd.get(), 5) ? throw std::runtime_error("Failed to bind or listen") : std::println("Server started on port: {}", port); + + log(LOG, "Server: initialized"); }; CServer::~CServer() { m_sockfd.reset(); + log(SYS, "Server: bye"); } Hyprutils::OS::CFileDescriptor *CServer::getSocket() { -- cgit v1.2.3