I can't progress until I add the address information to the Packet struct

This commit is contained in:
Kayne Ruse
2013-06-17 17:51:26 +10:00
parent 7b11bf22cb
commit 68ec7323a3
2 changed files with 12 additions and 1 deletions
+9 -1
View File
@@ -168,5 +168,13 @@ void ServerApplication::Broadcast(BroadcastRequest& bcast) {
}
void ServerApplication::HandleConnection(JoinRequest& request) {
cout << "request received" << endl;
//create the containers
ClientData client = { clientTicker++ };
PlayerData player = { playerTicker++ };
//link the containers
client.playerIndex = player.index;
player.clientIndex = client.index;
//??? oh fuck
}
+3
View File
@@ -61,6 +61,9 @@ private:
std::map<int, PlayerData> players;
bool running = false;
int clientTicker = 0;
int playerTicker = 0;
};
#endif