Last change
on this file since 12766 was 12060, checked in by hock@…, 11 years ago |
Reintegrate branch: 20130111-hock-message_classes
improvements:
- new message classes (reboost, zero-copy)
- "fast path" for direct links (skip overlay layer)
- link-properties accessible from the application
- SystemQueue can call boost::bind functions
- protlib compatibility removed (32bit overhead saved in every message)
- addressing2
- AddressDiscovery discoveres only addresses on which we're actually listening
- ariba serialization usage reduced (sill used in OverlayMsg)
- Node::connect, easier and cleaner interface to start-up ariba from the application
- ariba configs via JSON, XML, etc (boost::property_tree)
- keep-alive overhead greatly reduced
- (relayed) overlay links can actually be closed now
- lost messages are detected in most cases
- notification to the application when link is transformed into direct-link
- overlay routing: send message to second best hop if it would be dropped otherwise
- SequenceNumbers (only mechanisms, so for: upward compatibility)
- various small fixes
regressions:
- bluetooth is not yet working again
- bootstrap modules deactivated
- liblog4xx is not working (use cout-logging)
This patch brings great performance and stability improvements at cost of backward compatibility.
Also bluetooth and the bootstrap modules have not been ported to the new interfaces, yet.
|
File size:
831 bytes
|
Line | |
---|
1 | //-----------------------------------------------------------------------------
|
---|
2 | // Part of reboost (http://reboost.org). Released under the
|
---|
3 | // BSD 2-clause license (http://www.opensource.org/licenses/bsd-license.php).
|
---|
4 | // Copyright 2012, Sebastian Mies <mies@reboost.org> --- All rights reserved.
|
---|
5 | //-----------------------------------------------------------------------------
|
---|
6 |
|
---|
7 | #include "message.hpp"
|
---|
8 | #include<iostream>
|
---|
9 |
|
---|
10 | namespace reboost {
|
---|
11 |
|
---|
12 | struct to_stream {
|
---|
13 | std::ostream& os;
|
---|
14 | int i;
|
---|
15 | inline void operator()(buffer_t buf) {
|
---|
16 | if (i!=0) os <<",";
|
---|
17 | os << buf;
|
---|
18 | i++;
|
---|
19 | }
|
---|
20 | };
|
---|
21 |
|
---|
22 | std::ostream& operator<<(std::ostream& os, const message_t m) {
|
---|
23 | struct to_stream ts = { os, 0 };
|
---|
24 | os << "message({size=" << m.size() << ",buffers=" << (int) m.length()
|
---|
25 | << ",hash=" << m.hash() << "},";
|
---|
26 | m.msg_foreach(ts);
|
---|
27 | os << ")";
|
---|
28 | return os;
|
---|
29 | }
|
---|
30 |
|
---|
31 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.