#ifndef _TTRTS_NET_H_ #define _TTRTS_NET_H_ #include #include #include #include #include #include #include #include #include #include // Struct for net client info struct ClientInfo { sockaddr_in cli_addr; int clientsockfd; player_t player; }; int WaitForOrdersFromClient(const ClientInfo info, std::mutex &mut, CTTRTSGame &game); void GetOrdersFromClients(std::vector &myClients, CTTRTSGame &game, std::mutex &gameMutex); void SendGameInfoToClients(std::vector &myClients, const CTTRTSGame &game, std::mutex &gameMutex); inline void error(const char *msg) { perror(msg); exit(1); } #endif