Changeset b35b2b2 in network-game for common/MessageProcessor.cpp
- Timestamp:
- Jul 29, 2013, 10:32:59 PM (11 years ago)
- Branches:
- master
- Children:
- d05086b
- Parents:
- 297682c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
common/MessageProcessor.cpp
r297682c rb35b2b2 52 52 cout << "Got message of type " << msg->type << endl; 53 53 54 ackedMessages[msg->id] = getCurrentMillis(); 54 ackedMessages[msg->id] = MessageContainer(*msg, *source); 55 ackedMessages[msg->id].setAcked(true); 56 ackedMessages[msg->id].setTimeAcked(getCurrentMillis()); 55 57 56 58 NETWORK_MSG ack; … … 68 70 69 71 void MessageProcessor::resendUnackedMessages(int sock) { 70 map< int, map<unsigned long, MessageContainer> >::iterator it;72 map<unsigned int, map<unsigned long, MessageContainer> >::iterator it; 71 73 map<unsigned long, MessageContainer>::iterator it2; 72 74 map<unsigned long, MessageContainer> sentMsg; … … 83 85 84 86 void MessageProcessor::cleanAckedMessages() { 85 map< int, map<unsigned long, MessageContainer> >::iterator it = sentMessages.begin();87 map<unsigned int, map<unsigned long, MessageContainer> >::iterator it = sentMessages.begin(); 86 88 map<unsigned long, MessageContainer>::iterator it2; 87 89 … … 104 106 } 105 107 108 /* 106 109 map<unsigned int, unsigned long long>::iterator it3 = ackedMessages.begin(); 107 110 … … 112 115 it3++; 113 116 } 117 */ 114 118 } 119 120 map<unsigned int, map<unsigned long, MessageContainer> >& MessageProcessor::getSentMessages() { 121 return this->sentMessages; 122 } 123 124 map<unsigned int, MessageContainer>& MessageProcessor::getAckedMessages() { 125 return this->ackedMessages; 126 }
Note:
See TracChangeset
for help on using the changeset viewer.