Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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


Ignore:
Timestamp:
Jul 27, 2006, 7:24:41 PM (18 years ago)
Author:
patrick
Message:

extending the message structure

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

Legend:

Unmodified
Added
Removed
  • branches/proxy/src/lib/network/message_manager.cc

    r9517 r9519  
    199199         outgoingMessageQueue[userId].recievedMessages.end() )
    200200    {
     201      // call the handler function and handle errors
    201202      if ( !(*(messageHandlerMap[(MessageType)messageType].cb))( (MessageType)messageType, data + i, messageLength,
    202203                                                                 messageHandlerMap[(MessageType)messageType].someData, userId ) )
     
    211212
    212213        incomingMessageQueue.push_back( msg );
    213         PRINTF(0)("<<< MessageManager: got msg with type: %i\n", messageType);
    214214      }
    215215      outgoingMessageQueue[userId].recievedMessages.push_back( number );
     216      PRINTF(0)("<<< MessageManager: got msg with type: %i\n", messageType);
    216217    }
    217218    i += messageLength;
     
    342343      msg.messageType = messageType;
    343344      msg.number = this->newNumber++;
     345      msg.senderId = SharedNetworkData::getInstance()->getHostID();
     346      msg.destinationId = reciever;
    344347      msg.priority = messagePriority;
    345348
     
    356359      msg.messageType = messageType;
    357360      msg.number = this->newNumber++;
     361      msg.senderId = SharedNetworkData::getInstance()->getHostID();
     362      msg.destinationId = reciever;
    358363      msg.priority = messagePriority;
    359364
     
    377382      msg.messageType = messageType;
    378383      msg.number = this->newNumber++;
     384      msg.senderId = SharedNetworkData::getInstance()->getHostID();
     385      msg.destinationId = reciever;
    379386      msg.priority = messagePriority;
    380387
     
    396403    msg.messageType = messageType;
    397404    msg.number = SharedNetworkData::getInstance()->getHostID();
     405    msg.senderId = SharedNetworkData::getInstance()->getHostID();
     406    msg.destinationId = reciever;
    398407    msg.priority = messagePriority;
    399408
  • branches/proxy/src/lib/network/message_manager.h

    r9514 r9519  
    6161struct NetworkMessage
    6262{
    63   MessageType        messageType;
    64   byte *           data;
    65   int              length;
    66   int              number;
    67   MessagePriority  priority;
     63  MessageType      messageType;                         //!< type of the message
     64  byte *           data;                                //!< data
     65  int              length;                              //!< length of the data
     66  int              number;                              //!< serial number
     67  int              senderId;                            //!< userId of the sender
     68  int              destinationId;                       //!< userId of the destination
     69  MessagePriority  priority;                            //!< priority of the messages
    6870};
    6971
Note: See TracChangeset for help on using the changeset viewer.