Changeset 12060 for source/ariba/CommunicationListener.cpp
- Timestamp:
- Jun 19, 2013, 11:05:49 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
source/ariba/CommunicationListener.cpp
r7468 r12060 59 59 60 60 void CommunicationListener::onLinkFail(const LinkID& l, const NodeID& r) { 61 onLinkDown(l, r); 61 62 } 62 63 … … 69 70 } 70 71 72 // this implementation provides backward compatibility 73 // overwrite it to use the new interface 74 void CommunicationListener::onMessage(reboost::shared_buffer_t message, 75 const NodeID& remote, 76 const LinkID& lnk, 77 const SequenceNumber& seqnum, 78 const ariba::overlay::OverlayMsg* overlay_msg) 79 { 80 // copy data 81 Data data; 82 data.setLength(message.size() * 8); 83 memcpy(data.getBuffer(), message.data(), message.size()); 84 85 // and prepare old-style overlay message 86 Message legacy_msg; 87 legacy_msg.setPayload(data); 88 89 90 // * call legacy handler * 91 this->onMessage(legacy_msg, remote, lnk); 92 } 93 71 94 void CommunicationListener::onKeyValue( const Data& key, const vector<Data>& value ) { 72 95 } 73 96 97 bool CommunicationListener::onPing(const NodeID& remote) 98 { 99 return true; 100 } 101 102 void CommunicationListener::onPingLost(const NodeID& remote) 103 { 104 } 105 106 void CommunicationListener::onPong(const NodeID& remote) 107 { 108 } 109 74 110 } // namespace ariba
Note:
See TracChangeset
for help on using the changeset viewer.