16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-21 14:49:19 +02:00
This commit is contained in:
milek7
2019-01-14 22:45:22 +01:00
parent b2a9388fab
commit f55a5465ef
30 changed files with 172 additions and 214 deletions

View File

@@ -19,6 +19,7 @@ namespace network
std::shared_ptr<delta_message>>> delta_queue;
command_queue::commands_map client_commands_queue;
bool is_client;
//std::chrono::high_resolution_clock::time_point last_time;
//double accum = -1.0;
@@ -30,6 +31,7 @@ namespace network
void data_received(std::string &buffer);
public:
connection(bool client = false);
void send_message(std::shared_ptr<message> msg);
virtual void connected();
@@ -47,7 +49,6 @@ namespace network
server();
void push_delta(double dt, double sync, command_queue::commands_map commands);
command_queue::commands_map pop_commands();
void notify_train(std::string name);
};
class client
@@ -58,6 +59,5 @@ namespace network
public:
std::tuple<double, double, command_queue::commands_map> get_next_delta();
void send_commands(command_queue::commands_map commands);
void request_train(std::string name);
};
}