diff options
| author | github-actions[bot] <github-actions[bot]@users.noreply.github.com> | 2025-03-05 09:34:59 +0000 |
|---|---|---|
| committer | github-actions[bot] <github-actions[bot]@users.noreply.github.com> | 2025-03-05 09:34:59 +0000 |
| commit | c90cd32af3a50bbaa3829eff91ef48913512b1ac (patch) | |
| tree | f5684676c91c34a9f5a4619dbdadee18c70732ef | |
| parent | 39b5e87d421948a7217efd583abb515b36f9767d (diff) | |
style: clang-format
| -rw-r--r-- | src/FileDescriptor.cpp | 2 | ||||
| -rw-r--r-- | src/server.cpp | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/FileDescriptor.cpp b/src/FileDescriptor.cpp index 2bb87f7..79ccce2 100644 --- a/src/FileDescriptor.cpp +++ b/src/FileDescriptor.cpp @@ -1,6 +1,6 @@ +#include "FileDescriptor.hpp" #include <cstdlib> #include <fcntl.h> -#include "FileDescriptor.hpp" #include <sys/poll.h> #include <unistd.h> #include <utility> diff --git a/src/server.cpp b/src/server.cpp index d8133d8..18a20ea 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -17,9 +17,10 @@ CServer::CServer(uint16_t port) m_addr.sin_family = AF_INET; m_addr.sin_port = htons(port); m_addr.sin_addr.s_addr = INADDR_ANY; - bind(m_sockfd.get(), reinterpret_cast<sockaddr *>(&m_addr), sizeof(m_addr)) || - listen(m_sockfd.get(), 5) - ? throw std::runtime_error("Failed to bind or listen") : std::println("Server started on port: {}", port); + bind(m_sockfd.get(), reinterpret_cast<sockaddr *>(&m_addr), sizeof(m_addr)) || + listen(m_sockfd.get(), 5) + ? throw std::runtime_error("Failed to bind or listen") + : std::println("Server started on port: {}", port); }; CServer::~CServer() { |
