From 68ec7323a3d8ba8a8d8baa0a2c2f321115fa40b3 Mon Sep 17 00:00:00 2001 From: Kayne Ruse Date: Mon, 17 Jun 2013 17:51:26 +1000 Subject: [PATCH] I can't progress until I add the address information to the Packet struct --- server/server_application.cpp | 10 +++++++++- server/server_application.hpp | 3 +++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/server/server_application.cpp b/server/server_application.cpp index ede35c2..e158869 100644 --- a/server/server_application.cpp +++ b/server/server_application.cpp @@ -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 } \ No newline at end of file diff --git a/server/server_application.hpp b/server/server_application.hpp index 9a26cce..9876ca5 100644 --- a/server/server_application.hpp +++ b/server/server_application.hpp @@ -61,6 +61,9 @@ private: std::map players; bool running = false; + + int clientTicker = 0; + int playerTicker = 0; }; #endif