Changeset 9514 in orxonox.OLD
- Timestamp:
- Jul 27, 2006, 6:07:18 PM (18 years ago)
- Location:
- branches/proxy/src/lib/network
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/proxy/src/lib/network/README.NETWORK
r9494 r9514 13 13 - actualy the whole message sending system won't work in this network topic. proxys have to relay messages to clients 14 14 - the clients cant get its ip in the handleHandshakes without throuwing sigseg 15 - MessageManager: proxy/server forward the messages always. Perhaps there is a case, where messages get forwarded forever if there is a loop in the network. think about it again. 15 16 16 17 … … 72 73 73 74 75 MessageManager: 76 =============== 77 The message manager has special handling if its a master/proxy: the messages will simply be forwarded to the other server -
branches/proxy/src/lib/network/message_manager.cc
r9512 r9514 170 170 int messageLength, messageType; 171 171 172 // now go through all messages172 // now go through all newly received messages 173 173 for ( int j = 0; j < nMessages; j++ ) 174 174 { … … 199 199 outgoingMessageQueue[userId].recievedMessages.end() ) 200 200 { 201 if ( !(*(messageHandlerMap[(MessageType)messageType].cb))( (MessageType)messageType, data + i, messageLength, messageHandlerMap[(MessageType)messageType].someData, userId ) ) 201 if ( !(*(messageHandlerMap[(MessageType)messageType].cb))( (MessageType)messageType, data + i, messageLength, 202 messageHandlerMap[(MessageType)messageType].someData, userId ) ) 202 203 { 203 204 NetworkMessage msg; … … 216 217 } 217 218 218 219 // now call the message handlers with the new message 219 220 //TODO maybe handle incomingMessage in tick function. else local messages will not be handled if no clients are connected 220 221 for ( std::list<NetworkMessage>::iterator it = incomingMessageQueue.begin(); it != incomingMessageQueue.end(); ) 221 222 { 223 PRINTF(0)(" MessageManager: got msg with type: %i\n", it->messageType); 224 222 225 if ( (*(messageHandlerMap[it->messageType].cb))( it->messageType, it->data, it->length, messageHandlerMap[it->messageType].someData, it->number ) ) 223 226 { -
branches/proxy/src/lib/network/message_manager.h
r9508 r9514 81 81 struct MessageHandler 82 82 { 83 MessageCallback cb;83 MessageCallback cb; 84 84 MessageType messageType; 85 void * someData;85 void * someData; 86 86 }; 87 87
Note: See TracChangeset
for help on using the changeset viewer.