ORE Studio 0.0.4
Loading...
Searching...
No Matches
server_options.hpp
1/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2 *
3 * Copyright (C) 2025 Marco Craveiro <marco.craveiro@gmail.com>
4 *
5 * This program is free software; you can redistribute it and/or modify it under
6 * the terms of the GNU General Public License as published by the Free Software
7 * Foundation; either version 3 of the License, or (at your option) any later
8 * version.
9 *
10 * This program is distributed in the hope that it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
13 * details.
14 *
15 * You should have received a copy of the GNU General Public License along with
16 * this program; if not, write to the Free Software Foundation, Inc., 51
17 * Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 *
19 */
20#ifndef ORES_COMMS_NET_SERVER_OPTIONS_HPP
21#define ORES_COMMS_NET_SERVER_OPTIONS_HPP
22
23#include <iosfwd>
24#include <string>
25#include <cstdint>
26#include <optional>
27
28namespace ores::comms::net {
29
33struct server_options final {
37 std::uint16_t port = 55555;
41 std::uint32_t max_connections = 10;
45 std::string certificate_file = "server.crt";
49 std::string private_key_file = "server.key";
53 std::string server_identifier = "ores-server";
54
60 std::optional<std::string> certificate_chain_content;
61
67 std::optional<std::string> private_key_content;
68
75};
76
77std::ostream& operator<<(std::ostream& s, const server_options& v);
78
79}
80
81#endif
Contains the networking elements of the comms library.
Definition client.hpp:42
Configuration for the server.
Definition server_options.hpp:33
std::string certificate_file
Path to the TLS certificate file (PEM format).
Definition server_options.hpp:45
bool enable_signal_watching
Whether to enable signal watching.
Definition server_options.hpp:74
std::optional< std::string > private_key_content
Optional content of the TLS private key (PEM format).
Definition server_options.hpp:67
std::uint16_t port
TCP port the server listens on.
Definition server_options.hpp:37
std::uint32_t max_connections
Maximum number of concurrent client connections.
Definition server_options.hpp:41
std::string server_identifier
Human-readable identifier for the server instance.
Definition server_options.hpp:53
std::string private_key_file
Path to the TLS private key file (PEM format).
Definition server_options.hpp:49
std::optional< std::string > certificate_chain_content
Optional content of the TLS certificate chain (PEM format).
Definition server_options.hpp:60