16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-19 02:09:17 +02:00
Files
maszyna/network/manager.h
milek7 f55a5465ef work
2019-01-14 22:45:22 +01:00

29 lines
615 B
C++

#pragma once
#include <asio.hpp>
#include <memory>
#include "network/network.h"
#include "command.h"
namespace network
{
class manager
{
asio::io_context io_context;
public:
manager();
std::shared_ptr<network::server> server;
std::shared_ptr<network::client> client;
void create_server();
void connect();
void poll();
std::tuple<double, double, command_queue::commands_map> get_next_delta();
void push_delta(double delta, double sync, command_queue::commands_map commands);
command_queue::commands_map pop_commands();
void send_commands(command_queue::commands_map commands);
};
}