Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9514 in orxonox.OLD for branches/proxy/src/lib


Ignore:
Timestamp:
Jul 27, 2006, 6:07:18 PM (18 years ago)
Author:
patrick
Message:

messag reciving debug

Location:
branches/proxy/src/lib/network
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/proxy/src/lib/network/README.NETWORK

    r9494 r9514  
    1313 - actualy the whole message sending system won't work in this network topic. proxys have to relay messages to clients
    1414 - 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.
    1516
    1617
     
    7273
    7374
     75MessageManager:
     76===============
     77The 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  
    170170  int messageLength, messageType;
    171171
    172   // now go through all messages
     172  // now go through all newly received messages
    173173  for ( int j = 0; j < nMessages; j++ )
    174174  {
     
    199199         outgoingMessageQueue[userId].recievedMessages.end() )
    200200    {
    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 ) )
    202203      {
    203204        NetworkMessage msg;
     
    216217  }
    217218
    218 
     219  // now call the message handlers with the new message
    219220  //TODO maybe handle incomingMessage in tick function. else local messages will not be handled if no clients are connected
    220221  for ( std::list<NetworkMessage>::iterator it = incomingMessageQueue.begin(); it != incomingMessageQueue.end();  )
    221222  {
     223    PRINTF(0)(" MessageManager: got msg with type: %i\n", it->messageType);
     224
    222225    if ( (*(messageHandlerMap[it->messageType].cb))( it->messageType, it->data, it->length, messageHandlerMap[it->messageType].someData, it->number ) )
    223226    {
  • branches/proxy/src/lib/network/message_manager.h

    r9508 r9514  
    8181struct MessageHandler
    8282{
    83   MessageCallback cb;
     83  MessageCallback   cb;
    8484  MessageType       messageType;
    85   void *          someData;
     85  void *            someData;
    8686};
    8787
Note: See TracChangeset for help on using the changeset viewer.