Changeset 5755e68 in network-game
- Timestamp:
- Jul 16, 2013, 12:53:06 AM (11 years ago)
- Branches:
- master
- Children:
- 6b641af
- Parents:
- 4fcf7a4
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
common/MessageProcessor.cpp
r4fcf7a4 r5755e68 38 38 if (msg->type == MSG_TYPE_ACK) { 39 39 if (!sentMessages[msg->id].isAcked) { 40 cout << "Received new ack" << endl; 40 41 sentMessages[msg->id].isAcked = true; 41 42 sentMessages[msg->id].timeAcked = getCurrentMillis(); 42 } 43 }else 44 cout << "Received old ack" << endl; 43 45 44 46 return -1; // don't do any further processing … … 53 55 NETWORK_MSG ack; 54 56 ack.id = msg->id; 57 ack.type = MSG_TYPE_ACK; 55 58 56 //sendto(sock, (char*)&ack, sizeof(NETWORK_MSG), 0, (struct sockaddr *)source, sizeof(struct sockaddr_in));59 sendto(sock, (char*)&ack, sizeof(NETWORK_MSG), 0, (struct sockaddr *)source, sizeof(struct sockaddr_in)); 57 60 } 58 61
Note:
See TracChangeset
for help on using the changeset viewer.