SDL_net is working

This commit is contained in:
Kayne Ruse
2013-09-09 12:15:26 +10:00
parent 6c5197f3f2
commit 1dfeabf195
7 changed files with 277 additions and 51 deletions
+14 -2
View File
@@ -22,10 +22,20 @@
#ifndef SERVERAPPLICATION_HPP_
#define SERVERAPPLICATION_HPP_
#include "lua/lua.hpp"
#include "udp_network_utility.hpp"
#include "sqlite3/sqlite3.h"
#include "SDL/SDL.h"
#include <list>
//hold the info about the clients
struct ClientEntry {
static int indexCounter;
int index = indexCounter++;
IPaddress add = {0, 0};
};
//The main application class
class ServerApplication {
private:
@@ -43,8 +53,10 @@ public:
private:
bool running = true;
lua_State* luaState = nullptr;
sqlite3* database = nullptr;
UDPNetworkUtility networkUtil;
std::list<ClientEntry> clientEntries;
};
#endif