- Timestamp:
- Oct 7, 2015, 11:52:50 PM (9 years ago)
- Branches:
- master
- Children:
- e2a0a27
- Parents:
- 35d702d
- Location:
- common
- Files:
-
- 2 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) { -
common/MessageContainer.h
r35d702d r13a8212 59 59 struct sockaddr_in clientAddr; 60 60 bool isAcked; 61 unsigned long long timeSent; 61 62 unsigned long long timeAcked; 62 63 … … 67 68 ~MessageContainer(); 68 69 70 NETWORK_MSG* getMessage(); 69 71 bool getAcked(); 72 unsigned long long getTimeSent(); 70 73 unsigned long long getTimeAcked(); 71 NETWORK_MSG* getMessage();72 74 73 75 void setAcked(bool acked); 76 void setTimeSent(unsigned long long time); 74 77 void setTimeAcked(unsigned long long time); 75 78
Note:
See TracChangeset
for help on using the changeset viewer.