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-28 00:34:36 +01:00
parent 40d324b957
commit d5760c9e9c
6 changed files with 60 additions and 30 deletions

View File

@@ -66,7 +66,7 @@ namespace network
std::shared_ptr<std::istream> backbuffer;
protected:
void handle_message(connection &conn, const message &msg);
void handle_message(std::shared_ptr<connection> conn, const message &msg);
std::vector<std::shared_ptr<connection>> clients;
@@ -76,13 +76,13 @@ namespace network
server(std::shared_ptr<std::istream> buf);
void push_delta(double dt, double sync, const command_queue::commands_map &commands);
command_queue::commands_map pop_commands();
void update();
};
class client
{
protected:
void handle_message(connection &conn, const message &msg);
virtual void connect() = 0;
void handle_message(std::shared_ptr<connection> conn, const message &msg);
std::shared_ptr<connection> conn;
size_t messages_counter = 0;