Reworked NetworkQueue as a template class
This commit is contained in:
@@ -23,7 +23,8 @@
|
||||
#define SERVERAPPLICATION_HPP_
|
||||
|
||||
#include "config_utility.hpp"
|
||||
#include "network_queue.hpp"
|
||||
#include "network_packet.hpp"
|
||||
#include "thread_safe_queue.hpp"
|
||||
#include "udp_network_utility.hpp"
|
||||
#include "world_room.hpp"
|
||||
|
||||
@@ -31,8 +32,6 @@
|
||||
#include "SDL/SDL.h"
|
||||
#include "SDL/SDL_thread.h"
|
||||
|
||||
#include <list>
|
||||
|
||||
//The main application class
|
||||
class ServerApplication {
|
||||
public:
|
||||
@@ -54,19 +53,11 @@ private:
|
||||
|
||||
//networking
|
||||
UDPNetworkUtility networkUtil;
|
||||
NetworkQueue networkQueue;
|
||||
ThreadSafeQueue<NetworkPacket> networkQueue;
|
||||
SDL_Thread* networkQueueThread = nullptr;
|
||||
|
||||
//database
|
||||
sqlite3* database = nullptr;
|
||||
|
||||
//clients
|
||||
struct ClientEntry {
|
||||
static int indexCounter;
|
||||
int index = indexCounter++;
|
||||
IPaddress add = {0, 0};
|
||||
};
|
||||
std::list<ClientEntry> clientEntries;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user