Ignore:
Timestamp:
Apr 23, 2009, 6:58:34 PM (16 years ago)
Author:
Christoph Mayer
Message:

-fixed all compile errors, but now the overlay functionality is messed up somewhere

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sample/pingpong/PingPong.cpp

    r3055 r3056  
    1313
    1414// the service that the pingpong wants to use
    15 ServiceID PingPong::PINGPONG_ID = ServiceID( 111 );
     15ServiceID PingPong::PINGPONG_SERVICEID = ServiceID( 111 );
    1616
    1717// construction
     
    6363
    6464        // bind communication and node listener
    65         node->bind( this );                       /*NodeListener*/
    66         node->bind( this, PingPong::PINGPONG_ID); /*CommunicationListener*/
     65        node->bind( this );                              /*NodeListener*/
     66        node->bind( this, PingPong::PINGPONG_SERVICEID); /*CommunicationListener*/
    6767
    6868        // start node module
     
    8888
    8989        // unbind communication and node listener
    90         node->unbind( this );                        /*NodeListener*/
    91         node->unbind( this, PingPong::PINGPONG_ID ); /*CommunicationListener*/
     90        node->unbind( this );                               /*NodeListener*/
     91        node->unbind( this, PingPong::PINGPONG_SERVICEID ); /*CommunicationListener*/
    9292
    9393        // leave spovnet
     
    121121        vector<NodeID> nodes = node->getNeighborNodes();
    122122        BOOST_FOREACH( NodeID nid, nodes ){
    123                 node->sendMessage( pingmsg, nid, PingPong::PINGPONG_ID );
     123                node->sendMessage( pingmsg, nid, PingPong::PINGPONG_SERVICEID );
    124124        }
    125125
     
    128128        //           internally, gets all neighboring nodes and sends the message
    129129        //-----------------------------------------------------------------------
    130         // node->sendBroadcastMessage( pingmsg, PingPong::PINGPONG_ID );
     130        // node->sendBroadcastMessage( pingmsg, PingPong::PINGPONG_SERVICEID );
    131131}
    132132
    133 // node listener interface
    134133void PingPong::onJoinCompleted( const SpoVNetID& vid ) {
    135134        logging_info( "pingpong node join completed, spovnetid=" << vid.toString() );
     
    153152// communication listener
    154153bool PingPong::onLinkRequest(const NodeID& remote, const DataMessage& msg) {
    155         return false;
     154        logging_debug( "node " << remote.toString() << " wants to build up a link with us ... allowing" );
     155        return true;
    156156}
    157157
     
    191191}
    192192
    193 void PingPong::onMessageSent(seqnum_t seq_num, bool failed, const DataMessage& msg ){
    194         logging_info( "received message sent event for seqnum " << seq_num
    195                         << " with result " << failed );
    196 }
    197 
    198193}}} // namespace ariba, application, pingpong
Note: See TracChangeset for help on using the changeset viewer.