Changeset 68d94de in network-game for common/MessageProcessor.cpp
- Timestamp:
- Dec 24, 2013, 3:02:22 PM (11 years ago)
- Branches:
- master
- Children:
- 8554263
- Parents:
- e1af80c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
common/MessageProcessor.cpp
re1af80c r68d94de 13 13 14 14 MessageProcessor::MessageProcessor() { 15 this->sock = 0; 16 this->outputLog = NULL; 17 lastUsedId = 0; 18 } 19 20 MessageProcessor::MessageProcessor(int sock, ofstream* outputLog) { 21 this->sock = sock; 22 this->outputLog = outputLog; 15 23 lastUsedId = 0; 16 24 } … … 19 27 } 20 28 21 int MessageProcessor::sendMessage(NETWORK_MSG *msg, int sock, struct sockaddr_in *dest, ofstream* outputLog) {29 int MessageProcessor::sendMessage(NETWORK_MSG *msg, struct sockaddr_in *dest) { 22 30 cout << "Sending message of type " << msg->type << endl; 23 31 … … 35 43 } 36 44 37 int MessageProcessor::receiveMessage(NETWORK_MSG *msg, int sock, struct sockaddr_in *source, ofstream* outputLog) {45 int MessageProcessor::receiveMessage(NETWORK_MSG *msg, struct sockaddr_in *source) { 38 46 socklen_t socklen = sizeof(struct sockaddr_in); 39 47 … … 84 92 } 85 93 86 void MessageProcessor::resendUnackedMessages( int sock, ofstream* outputLog) {94 void MessageProcessor::resendUnackedMessages() { 87 95 map<unsigned int, map<unsigned long, MessageContainer> >::iterator it; 88 96 map<unsigned long, MessageContainer>::iterator it2; … … 99 107 } 100 108 101 void MessageProcessor::cleanAckedMessages( ofstream* outputLog) {109 void MessageProcessor::cleanAckedMessages() { 102 110 map<unsigned int, map<unsigned long, MessageContainer> >::iterator it = sentMessages.begin(); 103 111 map<unsigned long, MessageContainer>::iterator it2;
Note:
See TracChangeset
for help on using the changeset viewer.