Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 27, 2006, 11:46:50 PM (18 years ago)
Author:
patrick
Message:

more proxy control functionality: message passing init

File:
1 edited

Legend:

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

    r9537 r9538  
    4141  this->setClassID( CL_PROXY_CONTROL, "ProxyControl" );
    4242
    43 //   MessageManager::getInstance()->registerMessageHandler( MSGID_CHANGENICKNAME, changeNickHandler, NULL );
     43  MessageManager::getInstance()->registerMessageHandler( MSGID_PROXY_NEWCLIENT, messageHandlerNewClient, NULL );
    4444
    4545  PRINTF(0)("ProxyControl created\n");
     
    7171}
    7272
     73
     74/**
     75 *  signals new client connected to this local proxy
     76 * @param userId userId of the new client
     77 */
     78void ProxyControl::signalNewClient(int userId)
     79{
     80  // make sure we are a proxy server
     81  assert(SharedNetworkData::getInstance()->isProxyServerActive());
     82
     83
     84}
     85
     86
     87/**
     88 * this is the handler for proxy signals: new clients
     89 *
     90 * @param messageType the type of the message
     91 * @param data message data
     92 * @param dataLength length of the message data
     93 * @param someData some other atteched data
     94 * @param senderId id of the sender client
     95 * @param destinationId id of the destination client
     96 * @return true if succeeded
     97 */
     98bool ProxyControl::messageHandlerNewClient( MessageType messageType, byte * data, int dataLength, void * someData, int senderId, int destinationId  )
     99{
     100  // part for the master server
     101  if( SharedNetworkData::getInstance()->isMasterServer())
     102  {
     103
     104  }
     105  else if(SharedNetworkData::getInstance()->isProxyServerActive())
     106  {
     107
     108  }
     109
     110  return true;
     111}
Note: See TracChangeset for help on using the changeset viewer.