Changeset c941e07 in network-game for server/server.cpp
- Timestamp:
- Nov 11, 2014, 1:05:14 AM (10 years ago)
- Branches:
- master
- Children:
- 48801af
- Parents:
- a9a1295
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
server/server.cpp
ra9a1295 rc941e07 43 43 // from used to be const. Removed that so I could take a reference 44 44 // and use it to send messages 45 void processMessage(const NETWORK_MSG& clientMsg, struct sockaddr_in& from, MessageProcessor& msgProcessor, map<unsigned int, Player*>& mapPlayers, map<string, Game*>& mapGames, ofstream& outputLog);45 void processMessage(const NETWORK_MSG& clientMsg, struct sockaddr_in& from, MessageProcessor& msgProcessor, map<unsigned int, Player*>& mapPlayers, map<string, Game*>& mapGames, DataAccess& da, ofstream& outputLog); 46 46 47 47 Player *findPlayerByName(map<unsigned int, Player*> &m, string name); … … 256 256 if (msgProcessor.receiveMessage(&clientMsg, &from) >= 0) 257 257 { 258 processMessage(clientMsg, from, msgProcessor, mapPlayers, mapGames, outputLog);258 processMessage(clientMsg, from, msgProcessor, mapPlayers, mapGames, da, outputLog); 259 259 260 260 cout << "Finished processing the message" << endl; … … 281 281 } 282 282 283 void processMessage(const NETWORK_MSG &clientMsg, struct sockaddr_in &from, MessageProcessor &msgProcessor, map<unsigned int, Player*>& mapPlayers, map<string, Game*>& mapGames, ofstream& outputLog)283 void processMessage(const NETWORK_MSG &clientMsg, struct sockaddr_in &from, MessageProcessor &msgProcessor, map<unsigned int, Player*>& mapPlayers, map<string, Game*>& mapGames, DataAccess& da, ofstream& outputLog) 284 284 { 285 285 NETWORK_MSG serverMsg; 286 DataAccess da;287 286 288 287 cout << "Inside processMessage" << endl;
Note:
See TracChangeset
for help on using the changeset viewer.