Changeset 13a8212 in network-game for common/MessageContainer.cpp
- Timestamp:
- Oct 7, 2015, 11:52:50 PM (9 years ago)
- Branches:
- master
- Children:
- e2a0a27
- Parents:
- 35d702d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
common/MessageContainer.cpp
r35d702d r13a8212 11 11 this->msg = mc.msg; 12 12 this->clientAddr = mc.clientAddr; 13 this->timeSent = mc.timeSent; 13 14 this->isAcked = mc.isAcked; 14 15 this->timeAcked = mc.timeAcked; … … 18 19 this->clientAddr = clientAddr; 19 20 this->msg = msg; 21 this->timeSent = 0; 20 22 this->isAcked = false; 21 23 this->timeAcked = 0; … … 25 27 } 26 28 29 NETWORK_MSG* MessageContainer::getMessage() { 30 return &msg; 31 } 32 27 33 bool MessageContainer::getAcked() { 28 34 return this->isAcked; 35 } 36 37 unsigned long long MessageContainer::getTimeSent() { 38 return this->timeSent; 29 39 } 30 40 … … 33 43 } 34 44 35 NETWORK_MSG* MessageContainer::getMessage() {36 return &msg;45 void MessageContainer::setAcked(bool acked) { 46 this->isAcked = acked; 37 47 } 38 48 39 void MessageContainer::setAcked(bool acked) { 40 cout << "acked before: " << this->isAcked << endl; 41 this->isAcked = acked; 42 cout << "acked after: " << this->isAcked << endl; 49 void MessageContainer::setTimeSent(unsigned long long time) { 50 this->timeSent = time; 43 51 } 44 45 52 46 53 void MessageContainer::setTimeAcked(unsigned long long time) {
Note:
See TracChangeset
for help on using the changeset viewer.