From 4b29eda16f94f3d1167423d046bc94d111d5b97a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 17 Jan 2026 16:38:59 +0000 Subject: [PATCH 1/5] Initial plan From a1ef0e6995b79dd1709a74c05d9ca0cdb584aa85 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 17 Jan 2026 16:47:08 +0000 Subject: [PATCH 2/5] Implement TCP server module with Bazel and Make build systems Co-authored-by: itssimmons <62354548+itssimmons@users.noreply.github.com> --- .bazelrc | 11 ++ .bazelversion | 1 + .gitignore | 5 + WORKSPACE | 11 ++ packages/tcp/.gitignore | 1 + packages/tcp/BUILD | 22 ++++ packages/tcp/Makefile | 48 ++++++++ packages/tcp/README.md | 163 +++++++++++++++++++++++++++ packages/tcp/include/tcp_server.hpp | 78 +++++++++++++ packages/tcp/package.json | 14 ++- packages/tcp/src/tcp_server.cc | 96 ++++++++++++++++ packages/tcp/test/manual_test.cc | 61 ++++++++++ packages/tcp/test/tcp_server_test.cc | 94 +++++++++++++++ 13 files changed, 601 insertions(+), 4 deletions(-) create mode 100644 .bazelrc create mode 100644 .bazelversion create mode 100644 WORKSPACE create mode 100644 packages/tcp/.gitignore create mode 100644 packages/tcp/BUILD create mode 100644 packages/tcp/Makefile create mode 100644 packages/tcp/README.md create mode 100644 packages/tcp/include/tcp_server.hpp create mode 100644 packages/tcp/src/tcp_server.cc create mode 100644 packages/tcp/test/manual_test.cc create mode 100644 packages/tcp/test/tcp_server_test.cc diff --git a/.bazelrc b/.bazelrc new file mode 100644 index 0000000..9d6b08d --- /dev/null +++ b/.bazelrc @@ -0,0 +1,11 @@ +# C++ configuration +build --cxxopt=-std=c++17 +build --host_cxxopt=-std=c++17 + +# Output configuration +build --verbose_failures +build --color=yes + +# Test configuration +test --test_output=errors +test --test_summary=detailed diff --git a/.bazelversion b/.bazelversion new file mode 100644 index 0000000..66ce77b --- /dev/null +++ b/.bazelversion @@ -0,0 +1 @@ +7.0.0 diff --git a/.gitignore b/.gitignore index 9b98524..b55f31b 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,8 @@ dist/ *.log .turbo/ .cache/ + +# Bazel +bazel-* +.bazel-cache/ +.bazelrc.user diff --git a/WORKSPACE b/WORKSPACE new file mode 100644 index 0000000..e7cbf4d --- /dev/null +++ b/WORKSPACE @@ -0,0 +1,11 @@ +workspace(name = "helix_server") + +load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") + +# GoogleTest +http_archive( + name = "com_google_googletest", + sha256 = "8ad598c73ad796e0d8280b082cebd82a630d73e73cd3c70057938a6501bba5d7", + strip_prefix = "googletest-1.14.0", + urls = ["https://github.com/google/googletest/archive/refs/tags/v1.14.0.tar.gz"], +) diff --git a/packages/tcp/.gitignore b/packages/tcp/.gitignore new file mode 100644 index 0000000..567609b --- /dev/null +++ b/packages/tcp/.gitignore @@ -0,0 +1 @@ +build/ diff --git a/packages/tcp/BUILD b/packages/tcp/BUILD new file mode 100644 index 0000000..459bbf9 --- /dev/null +++ b/packages/tcp/BUILD @@ -0,0 +1,22 @@ +load("@rules_cc//cc:defs.bzl", "cc_library", "cc_test") + +# TCP Server Library +cc_library( + name = "tcp_server", + srcs = ["src/tcp_server.cc"], + hdrs = ["include/tcp_server.hpp"], + includes = ["include"], + visibility = ["//visibility:public"], +) + +# TCP Server Tests +cc_test( + name = "tcp_server_test", + size = "small", + srcs = ["test/tcp_server_test.cc"], + deps = [ + ":tcp_server", + "@com_google_googletest//:gtest", + "@com_google_googletest//:gtest_main", + ], +) diff --git a/packages/tcp/Makefile b/packages/tcp/Makefile new file mode 100644 index 0000000..125329b --- /dev/null +++ b/packages/tcp/Makefile @@ -0,0 +1,48 @@ +# Makefile for Helix TCP Module +# Alternative build system to Bazel + +CXX = g++ +CXXFLAGS = -std=c++17 -Wall -Wextra -I./include +LDFLAGS = + +# Directories +SRC_DIR = src +INCLUDE_DIR = include +TEST_DIR = test +BUILD_DIR = build + +# Files +SOURCES = $(SRC_DIR)/tcp_server.cc +HEADERS = $(INCLUDE_DIR)/tcp_server.hpp +TEST_SOURCES = $(TEST_DIR)/manual_test.cc +OBJECTS = $(BUILD_DIR)/tcp_server.o + +# Targets +.PHONY: all clean test + +all: $(BUILD_DIR)/libtcp_server.a + +$(BUILD_DIR): + mkdir -p $(BUILD_DIR) + +$(BUILD_DIR)/tcp_server.o: $(SOURCES) $(HEADERS) | $(BUILD_DIR) + $(CXX) $(CXXFLAGS) -c $(SOURCES) -o $@ + +$(BUILD_DIR)/libtcp_server.a: $(OBJECTS) + ar rcs $@ $^ + +test: $(BUILD_DIR)/tcp_test + $(BUILD_DIR)/tcp_test + +$(BUILD_DIR)/tcp_test: $(SOURCES) $(TEST_SOURCES) $(HEADERS) | $(BUILD_DIR) + $(CXX) $(CXXFLAGS) $(SOURCES) $(TEST_SOURCES) -o $@ $(LDFLAGS) + +clean: + rm -rf $(BUILD_DIR) + +help: + @echo "Available targets:" + @echo " all - Build the TCP server library" + @echo " test - Build and run manual tests" + @echo " clean - Remove build artifacts" + @echo " help - Show this help message" diff --git a/packages/tcp/README.md b/packages/tcp/README.md new file mode 100644 index 0000000..8a2eed9 --- /dev/null +++ b/packages/tcp/README.md @@ -0,0 +1,163 @@ +# Helix TCP Module + +A C++ TCP server implementation for the Helix server framework. This module provides the foundational TCP layer that will be used to build HTTP protocol support. + +## Overview + +This module implements a basic TCP server in C++ with the goal of eventually supporting HTTP protocol. The library is designed to be exported as a Node.js/Bun addon. + +## Structure + +``` +packages/tcp/ +├── include/ # Header files +│ └── tcp_server.hpp +├── src/ # Implementation files +│ └── tcp_server.cc +├── test/ # Test files +│ ├── tcp_server_test.cc +│ └── manual_test.cc +├── BUILD # Bazel build configuration +├── package.json +└── README.md +``` + +## Features + +- **TCP Server Creation**: Factory function `create_server(address, port)` to create TCP server instances +- **Address Binding**: Bind to specific IP addresses (e.g., "127.0.0.1", "0.0.0.0") +- **Port Configuration**: Configure server to listen on any valid port +- **Server Lifecycle**: Start, stop, and check server status +- **Socket Options**: Automatic SO_REUSEADDR configuration +- **Error Handling**: Comprehensive error checking for socket operations + +## API + +### Main Function + +```cpp +TcpServer* create_server(const std::string& address, int port); +``` + +Creates a new TCP server instance. + +**Parameters:** +- `address`: IP address to bind to (e.g., "127.0.0.1", "0.0.0.0") +- `port`: Port number to listen on + +**Returns:** Pointer to a new `TcpServer` instance + +### TcpServer Class + +```cpp +class TcpServer { +public: + // Start the server and begin listening for connections + bool start(); + + // Stop the server and close all connections + void stop(); + + // Check if the server is currently running + bool isRunning() const; + + // Get the server address + const std::string& getAddress() const; + + // Get the server port + int getPort() const; +}; +``` + +## Building + +### Using Bazel (Recommended) + +Build the library: +```bash +bazel build //packages/tcp:tcp_server +``` + +Run tests: +```bash +bazel test //packages/tcp:tcp_server_test +``` + +### Using g++ Directly + +Compile the library: +```bash +g++ -std=c++17 -c -I./include src/tcp_server.cc -o tcp_server.o +``` + +Compile and run manual test: +```bash +g++ -std=c++17 -I./include src/tcp_server.cc test/manual_test.cc -o tcp_test +./tcp_test +``` + +## Testing + +The module includes comprehensive unit tests using Google Test framework: + +- Server creation and configuration +- Server lifecycle (start/stop) +- Multiple server instances +- Invalid address handling +- Port binding verification +- Running state management + +Run tests with: +```bash +bazel test //packages/tcp:tcp_server_test +``` + +## Usage Example + +```cpp +#include "tcp_server.hpp" +#include + +int main() { + // Create a TCP server + std::unique_ptr server( + helix::tcp::create_server("127.0.0.1", 8080) + ); + + // Start the server + if (server->start()) { + std::cout << "Server running on " + << server->getAddress() << ":" + << server->getPort() << std::endl; + + // Server is now listening for connections + // ... handle connections ... + + // Stop the server + server->stop(); + } + + return 0; +} +``` + +## Requirements + +- C++17 or later +- POSIX-compliant system (Linux, macOS) +- Bazel for building (or g++ for manual compilation) +- Google Test for running unit tests + +## Future Development + +This TCP module is the foundation for HTTP protocol implementation. Planned features include: + +1. Connection acceptance and management +2. HTTP request parsing +3. HTTP response generation +4. Keep-alive connection support +5. Node.js/Bun addon export + +## License + +MIT diff --git a/packages/tcp/include/tcp_server.hpp b/packages/tcp/include/tcp_server.hpp new file mode 100644 index 0000000..3667d37 --- /dev/null +++ b/packages/tcp/include/tcp_server.hpp @@ -0,0 +1,78 @@ +#ifndef HELIX_TCP_SERVER_HPP +#define HELIX_TCP_SERVER_HPP + +#include + +namespace helix { +namespace tcp { + +/** + * Configuration for creating a TCP server + */ +struct ServerConfig { + std::string address; + int port; + + ServerConfig(const std::string& addr, int p) + : address(addr), port(p) {} +}; + +/** + * TCP Server class + */ +class TcpServer { +public: + TcpServer(const ServerConfig& config); + ~TcpServer(); + + // Delete copy constructor and assignment operator + TcpServer(const TcpServer&) = delete; + TcpServer& operator=(const TcpServer&) = delete; + + /** + * Start the server and begin listening for connections + * @return true if server started successfully, false otherwise + */ + bool start(); + + /** + * Stop the server and close all connections + */ + void stop(); + + /** + * Check if the server is currently running + * @return true if server is running, false otherwise + */ + bool isRunning() const; + + /** + * Get the server address + */ + const std::string& getAddress() const { return config_.address; } + + /** + * Get the server port + */ + int getPort() const { return config_.port; } + +private: + ServerConfig config_; + int socket_fd_; + bool is_running_; +}; + +/** + * Factory function to create a TCP server + * This will be the main exported function for the addon + * + * @param address The IP address to bind to (e.g., "127.0.0.1", "0.0.0.0") + * @param port The port number to listen on + * @return Pointer to a new TcpServer instance + */ +TcpServer* create_server(const std::string& address, int port); + +} // namespace tcp +} // namespace helix + +#endif // HELIX_TCP_SERVER_HPP diff --git a/packages/tcp/package.json b/packages/tcp/package.json index 1039fb7..3723b16 100644 --- a/packages/tcp/package.json +++ b/packages/tcp/package.json @@ -1,9 +1,15 @@ { "type": "module", "name": "@helix-server/tcp", + "version": "0.1.0", + "description": "TCP server implementation for Helix server framework", + "main": "src/tcp_server.cc", "scripts": { - "build": "echo \"Building tcp package...\"", - "publish": "echo \"Publishing tcp package...\"", - "test": "echo \"Running tests for tcp package...\"" - } + "build": "bazel build //packages/tcp:tcp_server", + "test": "bazel test //packages/tcp:tcp_server_test", + "test:manual": "g++ -std=c++17 -I./include src/tcp_server.cc test/manual_test.cc -o /tmp/tcp_test && /tmp/tcp_test", + "clean": "bazel clean" + }, + "keywords": ["tcp", "server", "helix", "c++", "networking"], + "license": "MIT" } diff --git a/packages/tcp/src/tcp_server.cc b/packages/tcp/src/tcp_server.cc new file mode 100644 index 0000000..c5059ed --- /dev/null +++ b/packages/tcp/src/tcp_server.cc @@ -0,0 +1,96 @@ +#include "tcp_server.hpp" + +#include +#include +#include +#include +#include +#include + +namespace helix { +namespace tcp { + +TcpServer::TcpServer(const ServerConfig& config) + : config_(config), socket_fd_(-1), is_running_(false) {} + +TcpServer::~TcpServer() { + stop(); +} + +bool TcpServer::start() { + if (is_running_) { + std::cerr << "Server is already running" << std::endl; + return false; + } + + // Create socket + socket_fd_ = socket(AF_INET, SOCK_STREAM, 0); + if (socket_fd_ < 0) { + std::cerr << "Failed to create socket" << std::endl; + return false; + } + + // Set socket options to allow address reuse + int opt = 1; + if (setsockopt(socket_fd_, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(opt)) < 0) { + std::cerr << "Failed to set socket options" << std::endl; + close(socket_fd_); + socket_fd_ = -1; + return false; + } + + // Prepare the sockaddr_in structure + struct sockaddr_in server_addr; + std::memset(&server_addr, 0, sizeof(server_addr)); + server_addr.sin_family = AF_INET; + server_addr.sin_port = htons(config_.port); + + // Convert IPv4 address from text to binary form + if (inet_pton(AF_INET, config_.address.c_str(), &server_addr.sin_addr) <= 0) { + std::cerr << "Invalid address: " << config_.address << std::endl; + close(socket_fd_); + socket_fd_ = -1; + return false; + } + + // Bind the socket to the address + if (bind(socket_fd_, (struct sockaddr*)&server_addr, sizeof(server_addr)) < 0) { + std::cerr << "Failed to bind socket to " << config_.address << ":" << config_.port << std::endl; + close(socket_fd_); + socket_fd_ = -1; + return false; + } + + // Listen for incoming connections + if (listen(socket_fd_, 10) < 0) { + std::cerr << "Failed to listen on socket" << std::endl; + close(socket_fd_); + socket_fd_ = -1; + return false; + } + + is_running_ = true; + std::cout << "TCP Server listening on " << config_.address << ":" << config_.port << std::endl; + + return true; +} + +void TcpServer::stop() { + if (socket_fd_ >= 0) { + close(socket_fd_); + socket_fd_ = -1; + } + is_running_ = false; +} + +bool TcpServer::isRunning() const { + return is_running_; +} + +TcpServer* create_server(const std::string& address, int port) { + ServerConfig config(address, port); + return new TcpServer(config); +} + +} // namespace tcp +} // namespace helix diff --git a/packages/tcp/test/manual_test.cc b/packages/tcp/test/manual_test.cc new file mode 100644 index 0000000..950ca08 --- /dev/null +++ b/packages/tcp/test/manual_test.cc @@ -0,0 +1,61 @@ +#include "tcp_server.hpp" +#include +#include + +int main() { + std::cout << "Testing TCP Server..." << std::endl; + + // Test 1: Create server + std::unique_ptr server( + helix::tcp::create_server("127.0.0.1", 9090) + ); + + if (!server) { + std::cerr << "Failed to create server" << std::endl; + return 1; + } + std::cout << "✓ Server created successfully" << std::endl; + + // Test 2: Check configuration + if (server->getAddress() != "127.0.0.1") { + std::cerr << "Address mismatch" << std::endl; + return 1; + } + if (server->getPort() != 9090) { + std::cerr << "Port mismatch" << std::endl; + return 1; + } + std::cout << "✓ Configuration correct" << std::endl; + + // Test 3: Check initial state + if (server->isRunning()) { + std::cerr << "Server should not be running initially" << std::endl; + return 1; + } + std::cout << "✓ Initial state correct" << std::endl; + + // Test 4: Start server + if (!server->start()) { + std::cerr << "Failed to start server" << std::endl; + return 1; + } + std::cout << "✓ Server started successfully" << std::endl; + + // Test 5: Check running state + if (!server->isRunning()) { + std::cerr << "Server should be running" << std::endl; + return 1; + } + std::cout << "✓ Server is running" << std::endl; + + // Test 6: Stop server + server->stop(); + if (server->isRunning()) { + std::cerr << "Server should not be running after stop" << std::endl; + return 1; + } + std::cout << "✓ Server stopped successfully" << std::endl; + + std::cout << "\nAll tests passed!" << std::endl; + return 0; +} diff --git a/packages/tcp/test/tcp_server_test.cc b/packages/tcp/test/tcp_server_test.cc new file mode 100644 index 0000000..02ca8a7 --- /dev/null +++ b/packages/tcp/test/tcp_server_test.cc @@ -0,0 +1,94 @@ +#include "tcp_server.hpp" +#include +#include + +namespace helix { +namespace tcp { +namespace test { + +class TcpServerTest : public ::testing::Test { +protected: + void SetUp() override { + // Setup code if needed + } + + void TearDown() override { + // Cleanup code if needed + } +}; + +// Test create_server function +TEST_F(TcpServerTest, CreateServerReturnsValidPointer) { + std::unique_ptr server(create_server("127.0.0.1", 8080)); + ASSERT_NE(server, nullptr); +} + +// Test server configuration +TEST_F(TcpServerTest, ServerConfigurationIsCorrect) { + std::unique_ptr server(create_server("127.0.0.1", 8080)); + EXPECT_EQ(server->getAddress(), "127.0.0.1"); + EXPECT_EQ(server->getPort(), 8080); +} + +// Test initial server state +TEST_F(TcpServerTest, ServerInitiallyNotRunning) { + std::unique_ptr server(create_server("127.0.0.1", 8080)); + EXPECT_FALSE(server->isRunning()); +} + +// Test server start +TEST_F(TcpServerTest, ServerCanStart) { + std::unique_ptr server(create_server("127.0.0.1", 9001)); + EXPECT_TRUE(server->start()); + EXPECT_TRUE(server->isRunning()); + server->stop(); +} + +// Test server stop +TEST_F(TcpServerTest, ServerCanStop) { + std::unique_ptr server(create_server("127.0.0.1", 9002)); + server->start(); + server->stop(); + EXPECT_FALSE(server->isRunning()); +} + +// Test multiple start attempts +TEST_F(TcpServerTest, CannotStartServerTwice) { + std::unique_ptr server(create_server("127.0.0.1", 9003)); + EXPECT_TRUE(server->start()); + EXPECT_FALSE(server->start()); // Second start should fail + server->stop(); +} + +// Test invalid address +TEST_F(TcpServerTest, InvalidAddressFailsToStart) { + std::unique_ptr server(create_server("invalid.address", 8080)); + EXPECT_FALSE(server->start()); +} + +// Test server with different valid addresses +TEST_F(TcpServerTest, ServerStartsOnDifferentAddresses) { + std::unique_ptr server1(create_server("127.0.0.1", 9004)); + EXPECT_TRUE(server1->start()); + server1->stop(); + + std::unique_ptr server2(create_server("0.0.0.0", 9005)); + EXPECT_TRUE(server2->start()); + server2->stop(); +} + +// Test server with different ports +TEST_F(TcpServerTest, ServerStartsOnDifferentPorts) { + std::unique_ptr server1(create_server("127.0.0.1", 9006)); + std::unique_ptr server2(create_server("127.0.0.1", 9007)); + + EXPECT_TRUE(server1->start()); + EXPECT_TRUE(server2->start()); + + server1->stop(); + server2->stop(); +} + +} // namespace test +} // namespace tcp +} // namespace helix From 134c0ceb3b8b67f3c86e1a4dc324cce340a3dac0 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 17 Jan 2026 16:49:14 +0000 Subject: [PATCH 3/5] Address code review feedback: use smart pointers and named constants Co-authored-by: itssimmons <62354548+itssimmons@users.noreply.github.com> --- packages/tcp/README.md | 9 +++------ packages/tcp/include/tcp_server.hpp | 8 ++++++-- packages/tcp/src/tcp_server.cc | 6 +++--- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/packages/tcp/README.md b/packages/tcp/README.md index 8a2eed9..08be1fa 100644 --- a/packages/tcp/README.md +++ b/packages/tcp/README.md @@ -36,7 +36,7 @@ packages/tcp/ ### Main Function ```cpp -TcpServer* create_server(const std::string& address, int port); +std::unique_ptr create_server(const std::string& address, int port); ``` Creates a new TCP server instance. @@ -45,7 +45,7 @@ Creates a new TCP server instance. - `address`: IP address to bind to (e.g., "127.0.0.1", "0.0.0.0") - `port`: Port number to listen on -**Returns:** Pointer to a new `TcpServer` instance +**Returns:** Unique pointer to a new `TcpServer` instance ### TcpServer Class @@ -116,13 +116,10 @@ bazel test //packages/tcp:tcp_server_test ```cpp #include "tcp_server.hpp" -#include int main() { // Create a TCP server - std::unique_ptr server( - helix::tcp::create_server("127.0.0.1", 8080) - ); + auto server = helix::tcp::create_server("127.0.0.1", 8080); // Start the server if (server->start()) { diff --git a/packages/tcp/include/tcp_server.hpp b/packages/tcp/include/tcp_server.hpp index 3667d37..7b47473 100644 --- a/packages/tcp/include/tcp_server.hpp +++ b/packages/tcp/include/tcp_server.hpp @@ -1,11 +1,15 @@ #ifndef HELIX_TCP_SERVER_HPP #define HELIX_TCP_SERVER_HPP +#include #include namespace helix { namespace tcp { +// Default backlog size for listen() call +constexpr int DEFAULT_BACKLOG = 10; + /** * Configuration for creating a TCP server */ @@ -68,9 +72,9 @@ class TcpServer { * * @param address The IP address to bind to (e.g., "127.0.0.1", "0.0.0.0") * @param port The port number to listen on - * @return Pointer to a new TcpServer instance + * @return Unique pointer to a new TcpServer instance */ -TcpServer* create_server(const std::string& address, int port); +std::unique_ptr create_server(const std::string& address, int port); } // namespace tcp } // namespace helix diff --git a/packages/tcp/src/tcp_server.cc b/packages/tcp/src/tcp_server.cc index c5059ed..aa19767 100644 --- a/packages/tcp/src/tcp_server.cc +++ b/packages/tcp/src/tcp_server.cc @@ -62,7 +62,7 @@ bool TcpServer::start() { } // Listen for incoming connections - if (listen(socket_fd_, 10) < 0) { + if (listen(socket_fd_, DEFAULT_BACKLOG) < 0) { std::cerr << "Failed to listen on socket" << std::endl; close(socket_fd_); socket_fd_ = -1; @@ -87,9 +87,9 @@ bool TcpServer::isRunning() const { return is_running_; } -TcpServer* create_server(const std::string& address, int port) { +std::unique_ptr create_server(const std::string& address, int port) { ServerConfig config(address, port); - return new TcpServer(config); + return std::make_unique(config); } } // namespace tcp From c319cc010c9035460aadf2d13195e4886c75eb0d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 17 Jan 2026 16:50:23 +0000 Subject: [PATCH 4/5] Add detailed documentation for getter methods Co-authored-by: itssimmons <62354548+itssimmons@users.noreply.github.com> --- packages/tcp/include/tcp_server.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/tcp/include/tcp_server.hpp b/packages/tcp/include/tcp_server.hpp index 7b47473..4e8c364 100644 --- a/packages/tcp/include/tcp_server.hpp +++ b/packages/tcp/include/tcp_server.hpp @@ -52,11 +52,13 @@ class TcpServer { /** * Get the server address + * @return The IP address the server is configured to bind to */ const std::string& getAddress() const { return config_.address; } /** * Get the server port + * @return The port number the server is configured to listen on */ int getPort() const { return config_.port; } From 5f02158130b36d9c6f6e98d3e6c5ad05a69ada09 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 17 Jan 2026 16:52:34 +0000 Subject: [PATCH 5/5] Add C++ TCP server foundation for HTTP protocol implementation Co-authored-by: itssimmons <62354548+itssimmons@users.noreply.github.com> --- _codeql_detected_source_root | 1 + 1 file changed, 1 insertion(+) create mode 120000 _codeql_detected_source_root diff --git a/_codeql_detected_source_root b/_codeql_detected_source_root new file mode 120000 index 0000000..945c9b4 --- /dev/null +++ b/_codeql_detected_source_root @@ -0,0 +1 @@ +. \ No newline at end of file