@@ -5,7 +5,7 @@ C++11 client library for the [WAMP][wamp] protocol.
5
5
6
6
** Features** :
7
7
8
- - Supports the [ WAMP Basic Profile ] [ wamp-basic ]
8
+ - Supports the WAMP _ Basic Profile _
9
9
- Supports [ some advanced WAMP profile features] ( #advanced )
10
10
- Roles: _ Caller_ , _ Callee_ , _ Subscriber_ , _ Publisher_
11
11
- Transports: TCP and Unix domain raw sockets (with and without handshaking support)
@@ -28,8 +28,7 @@ C++11 client library for the [WAMP][wamp] protocol.
28
28
[ Boost.Context] [ boost-context ]
29
29
- (for testing) [ CMake] [ cmake ] and the [ Catch] [ catch ] unit test framework
30
30
31
- [ wamp ] : http://wamp.ws/
32
- [ wamp-basic ] : https://github.com/tavendo/WAMP/blob/master/spec/basic.md
31
+ [ wamp ] : http://wamp-proto.org/
33
32
[ boost-asio ] : http://www.boost.org/doc/libs/release/doc/html/boost_asio.html
34
33
[ boost-endian ] : https://github.com/boostorg/endian
35
34
[ boost ] : http://boost.org
@@ -96,8 +95,8 @@ iosvc.run();
96
95
boost::asio::spawn(iosvc, [&](boost::asio::yield_context yield)
97
96
{
98
97
:::
99
- session->enroll(Procedure("add"), unpackedRpc< int, int>(
100
- [](wamp::Invocation inv, int n, int m) {return { n+m} ;}),
98
+ session->enroll(Procedure("add"), basicRpc<int, int, int>(
99
+ [](int n, int m) -> int {return n+m;}),
101
100
yield);
102
101
:::
103
102
});
@@ -111,17 +110,16 @@ std::cout << "2 + 2 is " << result[0].to<int>() << "\n";
111
110
112
111
### Subscribing to a topic
113
112
```c++
114
- void sensorSampled(wamp::Event event, float value)
113
+ void sensorSampled(float value)
115
114
{
116
- std::cout << "Sensor sampled, publication ID = " << event.pubId()
117
- << " value = " << value << "\n";
115
+ std::cout << "Sensor sampled, value = " << value << "\n";
118
116
}
119
117
120
118
boost::asio::spawn(iosvc, [&](boost::asio::yield_context yield)
121
119
{
122
120
:::
123
121
session->subscribe(Topic("sensorSampled"),
124
- unpackedEvent <float>(&sensorSampled),
122
+ basicEvent <float>(&sensorSampled),
125
123
yield);
126
124
:::
127
125
});
@@ -138,7 +136,7 @@ session->publish(Pub("sensorSampled").withArgs(value));
138
136
139
137
- General: agent identification, feature announcement
140
138
- _Callee_: `call_trustlevels`, `caller_identification`, `pattern_based_registration`, `progressive_call_results`
141
- - _Caller_: `call_timeout`, `callee_blackwhite_listing`, `caller_exclusion`, ` caller_identification`
139
+ - _Caller_: `call_timeout`, `caller_identification`
142
140
- _Publisher_: `publisher_exclusion`, `publisher_identification`, `subscriber_blackwhite_listing`
143
141
- _Subscriber_: `pattern_based_subscription`, `publication_trustlevels`, `publisher_identification`
144
142
0 commit comments