Changeset 4738 for source/ariba/SideportListener.cpp
- Timestamp:
- Jul 4, 2009, 7:03:55 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
source/ariba/SideportListener.cpp
r3374 r4738 71 71 } 72 72 73 //****************************************************** 74 // 75 // JUST EXPERIMENTAL WITH RANDOM RESULTS 76 // 77 78 // 0 = normal node --> directly accessible 79 // 1 = relaying node --> node that is relaying for us (must also be 0) 80 // 2 = relayed node --> node that we cannot access directly 81 static map<NodeID,short> relayingnodes; 82 83 bool SideportListener::isRelayingNode(const NodeID& node){ 84 85 map<NodeID,short>::iterator i = relayingnodes.find(node); 86 if(i != relayingnodes.end()) return (i->second == 1); 87 88 relayingnodes.insert( std::make_pair( node, rand()%3 ) ); 89 } 90 91 bool SideportListener::isRelayedNode(const NodeID& node){ 92 93 map<NodeID,short>::iterator i = relayingnodes.find(node); 94 if(i != relayingnodes.end()) return (i->second == 2); 95 96 relayingnodes.insert( std::make_pair( node, rand()%3 ) ); 97 } 98 99 // 100 // 101 //****************************************************** 102 73 103 void SideportListener::configure( overlay::BaseOverlay* _overlay ) { 74 104 overlay = _overlay;
Note:
See TracChangeset
for help on using the changeset viewer.