17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-17 08:39:19 +02:00
Files
maszyna/network/manager.h
jerrrrycho 3198cabc78 refactor(sonar): declare non-mutating member functions const (cpp:S5817)
Virtual functions are left untouched so overrides keep matching.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 15:26:48 +02:00

35 lines
809 B
C++

#pragma once
#include <memory>
#include "network/network.h"
#include "input/command.h"
namespace network
{
class server_manager
{
private:
std::vector<std::shared_ptr<server>> servers;
std::shared_ptr<std::fstream> backbuffer;
public:
server_manager();
void push_delta(double render_dt, double dt, double sync, const command_queue::commands_map &commands) const;
command_queue::commands_map pop_commands() const;
void create_server(const std::string &backend, const std::string &conf);
};
class manager
{
public:
manager();
std::optional<server_manager> servers;
std::shared_ptr<network::client> client;
void create_server(const std::string &backend, const std::string &conf);
void connect(const std::string &backend, const std::string &conf);
void update();
};
}