From 6c79fe43fe2d6bbbb2808777e5553a7360b37d22 Mon Sep 17 00:00:00 2001 From: hovertank3d Date: Mon, 23 Feb 2026 03:05:12 +0100 Subject: revert to being a raw proxy --- include/net/server.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'include/net/server.hpp') diff --git a/include/net/server.hpp b/include/net/server.hpp index 9b5e7c5..f2b5240 100644 --- a/include/net/server.hpp +++ b/include/net/server.hpp @@ -1,8 +1,6 @@ #pragma once #include -#include -#include #include #include #include @@ -45,6 +43,9 @@ public: if (sock_fd < 0) throw std::runtime_error(strerror(errno)); + int yes=1; + setsockopt(sock_fd, SOL_SOCKET, SO_REUSEADDR, &yes, sizeof yes); + int bindStatus = ::bind(sock_fd, (struct sockaddr*)&server_address, sizeof(server_address)); if (bindStatus < 0) throw std::runtime_error(strerror(errno)); -- cgit v1.2.3