mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2025-07-01 23:35:41 +00:00
fix not following naming convention
This commit is contained in:
parent
e776848a76
commit
277036fc52
10
src/Http.cpp
10
src/Http.cpp
@ -29,20 +29,20 @@
|
|||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
|
|
||||||
using json = nlohmann::json;
|
using json = nlohmann::json;
|
||||||
struct connection {
|
struct Connection {
|
||||||
std::string host{};
|
std::string host{};
|
||||||
int port{};
|
int port{};
|
||||||
connection() = default;
|
Connection() = default;
|
||||||
connection(std::string host, int port)
|
Connection(std::string host, int port)
|
||||||
: host(host)
|
: host(host)
|
||||||
, port(port) {};
|
, port(port) {};
|
||||||
};
|
};
|
||||||
constexpr uint8_t CONNECTION_AMOUNT = 10;
|
constexpr uint8_t CONNECTION_AMOUNT = 10;
|
||||||
static thread_local uint8_t write_index = 0;
|
static thread_local uint8_t write_index = 0;
|
||||||
static thread_local std::array<connection, CONNECTION_AMOUNT> connections;
|
static thread_local std::array<Connection, CONNECTION_AMOUNT> connections;
|
||||||
static thread_local std::array<std::shared_ptr<httplib::SSLClient>, CONNECTION_AMOUNT> clients;
|
static thread_local std::array<std::shared_ptr<httplib::SSLClient>, CONNECTION_AMOUNT> clients;
|
||||||
|
|
||||||
[[nodiscard]] static std::shared_ptr<httplib::SSLClient> getClient(connection connectionInfo) {
|
[[nodiscard]] static std::shared_ptr<httplib::SSLClient> getClient(Connection connectionInfo) {
|
||||||
for (uint8_t i = 0; i < CONNECTION_AMOUNT; i++) {
|
for (uint8_t i = 0; i < CONNECTION_AMOUNT; i++) {
|
||||||
if (connectionInfo.host == connections[i].host
|
if (connectionInfo.host == connections[i].host
|
||||||
&& connectionInfo.port == connections[i].port) {
|
&& connectionInfo.port == connections[i].port) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user