Skip to content

Commit 546ec18

Browse files
committed
More documentation fixes.
1 parent f9077af commit 546ec18

File tree

5 files changed

+16
-11
lines changed

5 files changed

+16
-11
lines changed

README.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,14 +91,17 @@ void add(wamp::Invocation inv, int n, int m)
9191
boost::asio::spawn(iosvc, [&](boost::asio::yield_context yield)
9292
{
9393
...
94-
client->enroll<int, int>("add", &add, yield);
94+
auto reg = client->enroll<int, int>("add", &add, yield);
95+
...
9596
});
9697
```
9798

9899
### Calling a remote procedure
99100
```c++
100101
auto result = client->call("add", {2, 2}, yield);
101-
std::cout << "2 + 2 is " << result[0].to<Int>() << "\n";
102+
int sum = 0;
103+
result.to(sum);
104+
std::cout << "2 + 2 is " << sum << "\n";
102105
```
103106
104107
### Subscribing to a topic
@@ -112,7 +115,9 @@ void sensorSampled(wamp::PublicationId pid, float value)
112115
boost::asio::spawn(iosvc, [&](boost::asio::yield_context yield)
113116
{
114117
...
115-
client->subscribe<float>("sensorSampled", &sensorSampled, yield);
118+
auto sub = client->subscribe<float>("sensorSampled", &sensorSampled,
119+
yield);
120+
...
116121
});
117122
```
118123

doc/connectors.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,18 @@ The library currently supports two types of connectors:
1414
Connector | Declared in | For Transport
1515
-------------- | ---------------------------- | -----------
1616
`TcpConnector` | `<cppwamp/tcpconnector.hpp>` | TCP raw socket
17-
`UdsConnector` | `<cppwamp/tcpconnector.hpp>` | Unix Domain Socket
17+
`UdsConnector` | `<cppwamp/udsconnector.hpp>` | Unix Domain Socket
1818

1919
The above connectors support raw socket handshaking, introduced in [version e2c4e57][e2c4e57] of the advanced WAMP specification.
2020

2121
[e2c4e57]: https://github.com/tavendo/WAMP/commit/e2c4e5775d89fa6d991eb2e138e2f42ca2469fa8
2222

2323
For WAMP routers that do not yet support handshaking, alternate connectors are available under the `wamp::legacy` namespace:
2424

25-
Connector | Declared in | For Transport
26-
---------------------- | ---------------------------- | -------------
27-
`legacy::TcpConnector` | `<cppwamp/tcpconnector.hpp>` | Legacy TCP raw socket
28-
`legacy::UdsConnector` | `<cppwamp/tcpconnector.hpp>` | Legacy Unix Domain Socket
25+
Connector | Declared in | For Transport
26+
---------------------- | ---------------------------------- | -------------
27+
`legacy::TcpConnector` | `<cppwamp/legacytcpconnector.hpp>` | Legacy TCP raw socket
28+
`legacy::UdsConnector` | `<cppwamp/legacyudsconnector.hpp>` | Legacy Unix Domain Socket
2929

3030
When creating a connector, you must specify which serialization (aka codec) to use for encoding WAMP messages. The following serializers are currently supported:
3131

doc/errors.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,4 +80,4 @@ boost::asio::spawn(iosvc, [&](boost::asio::yield_context yield)
8080
8181
```
8282

83-
Note that `CoroErrcClient` will still throw `error::Logic` exceptions whenever preconditions are not met. Preconditions for API functions are listed in the reference documentation.
83+
Note that `CoroErrcClient` will still throw `error::Logic` exceptions whenever preconditions are not met. Preconditions for API functions are listed in the [reference documentation](http://ecorm.github.io/cppwamp/doc/index.html).

doc/pubsub.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Publish/Subscribe
1010
Publishing Events
1111
-----------------
1212

13-
The `publish` operation is used to publish events related to a topic. There are two kinds of `publish` overloads: one that takes an `Args` bungle, and another that doesn't. The latter overload is used when there are no arguments associated with an event.
13+
The `publish` operation is used to publish events related to a topic. There are two kinds of `publish` overloads: one that takes an `Args` bundle, and another that doesn't. The latter overload is used when there are no arguments associated with an event.
1414

1515
```c++
1616
boost::asio::spawn(iosvc, [&](boost::asio::yield_context yield)

doc/rpc.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Remote Procedure Calls
1010
Calling RPCs
1111
------------
1212

13-
The `call` operation is used to call remote procedures. There are two `call` overloads: one that takes an `Args` bungle, and another that doesn't. The latter overload is used when the remote procedure does not expect any arguments. For either overload, `call` returns an `Args` object, which contains the results returned by the remote procedure.
13+
The `call` operation is used to call remote procedures. There are two `call` overloads: one that takes an `Args` bundle, and another that doesn't. The latter overload is used when the remote procedure does not expect any arguments. For either overload, `call` returns an `Args` object, which contains the results returned by the remote procedure.
1414

1515
```c++
1616
boost::asio::spawn(iosvc, [&](boost::asio::yield_context yield)

0 commit comments

Comments
 (0)