Civilization
Public Member Functions | Public Attributes | List of all members
server::Server Class Reference

class Server - More...

#include <Server.hpp>

Public Member Functions

void start (unsigned short port=8080)
 
void handleClient (boost::asio::ip::tcp::socket socket)
 
std::shared_ptr< GameEnginecreateNewGame (std::shared_ptr< shared::Player > player)
 
std::shared_ptr< GameEnginegetGameById (std::string gameId)
 
bool connectPlayerToGame (std::shared_ptr< shared::Player > player, std::shared_ptr< GameEngine > game)
 
void registerClientAnswer (const std::string &response, std::shared_ptr< shared::Player > player)
 
void processMessage (boost::asio::streambuf &receiveBuffer, std::shared_ptr< shared::Player > player, std::shared_ptr< GameEngine > game)
 

Public Attributes

std::vector< std::shared_ptr< GameEngine > > games
 
std::mutex gamesMutex
 
std::atomic< bool > running = true
 

Detailed Description

class Server -


The documentation for this class was generated from the following files: