Skip to content

Commit 4c4149d

Browse files
committed
Update changelog
1 parent 66325f9 commit 4c4149d

File tree

1 file changed

+117
-1
lines changed

1 file changed

+117
-1
lines changed

CHANGELOG.md

Lines changed: 117 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,121 @@
1+
v0.11.0
2+
=======
3+
Polymorphic codecs and transports.
4+
5+
- Session is now a move-only type that can be instantiated on the stack.
6+
- Deprecated `Session::create`.
7+
- Added `ConnectionWish` and `ConnectionWishList` which should now be used
8+
in place of the old `Connection` and `ConnectionList` classes.
9+
- Passing `ConnectionWish` and `ConnectionWishList` via `Session::connect` is
10+
now preferred over passing the legacy `Connector` instances via
11+
`Session::create`.
12+
- `TcpHost` and `UdsPath` now have `withFormat` methods which generate a
13+
`ConnectionWish` that can be passed to `Session`.
14+
- The `authenticate`, `publish`, 'yield', and `cancel` methods of `Session`
15+
not taking a completion handler now return an `ErrorOrDone`. The thread-safe
16+
overloads for those now return a `std::future<ErrorOrDone>`.
17+
- AnyCompletionExecutor is now used by session to contain the user executor.
18+
- Added `Session::ongoingCall` for progressive call results, which
19+
automatically applies `rpc.withProgessiveResults(true)`.
20+
- Renamed `Session::reset` to `Session::terminate`, leaving the former as
21+
a deprecated alias.
22+
- Renamed `Session::userExecutor` to `Session::fallbackExecutor`, leaving the
23+
former as a deprecated alias.
24+
- `Session::fallbackExecutor` type relaxed to `AnyCompletionExecutor`.
25+
- Handlers registered via `Session`'s `setWarningHandler`, `setTraceHandler`,
26+
and `setStateChangeHandler` will no longer be fired after
27+
`Session::terminate` is called and before `Session::connect` is called.
28+
- Added `wamp::spawn` and `wamp::yield_context` in `<cppwamp/spawn.hpp>`, which
29+
are aliases to their Boost.Asio counterparts.
30+
- Added `wamp::spawnCompletionHandler` and `wamp::CompletionYieldContext`
31+
to support spawning coroutines via `Event::executor` and
32+
`Invocation::executor`.
33+
- When `CPPWAMP_USE_COMPLETION_YIELD_CONTEXT` is defined,
34+
wamp::BasicYieldContext<wamp::AnyCompletionExecutor> will be passed to
35+
coroutines spawned via Event/Invocation unpackers. The relaxes the requirement
36+
that the `Session::userExecutor()` originate from `boost::asio::io_context`.
37+
- When `CPPWAMP_USE_COMPLETION_YIELD_CONTEXT` and `ASIO_DISABLE_BOOST_COROUTINE`
38+
are defined, the coroutine Event/Invocation unpackers will use the new
39+
Boost.Context-based coroutines introduced in Boost 1.80.0. Please note this
40+
[bug](https://github.com/chriskohlhoff/asio/issues/1110) in Boost 1.80.0
41+
concerning exceptions thrown from these new Boost.Context-based coroutines.
42+
- Instead of throwing an exception, `Session` now emits a
43+
`TransportErrc::badTxLength` error via the completion handler or return value
44+
when the payload exceeds the transport's limit.
45+
- `Challenge::authenticate`, `Invocation::yield` and `Interruption::yield`
46+
now have thread-safe and non-thread-safe overloads.
47+
- Added `SessionErrc` error codes corresponding to new predefined error
48+
URIs that have appeared in the WAMP spec.
49+
- Added `Session::setLogHandler` which takes a handler of type `void (LogEntry)`
50+
and unifies all log event handling.
51+
- Added `Session::setLogLevel` for use with `Session::setLogHandler`.
52+
- Renamed `AsioContext` to `IoContext`, leaving the former as a deprecated
53+
alias.
54+
- Deprecated `AsioErrorCode`.
55+
- Deprecated `ProtocolErrc` and `ProtocolCategory` in favor of
56+
`SessionErrc::protocolViolation`.
57+
- Deprecated `Session::setWarningHandler` and `Session::setTraceHandler` in
58+
favor of `Session::setLogHandler`.
59+
60+
Implementation improvements:
61+
62+
- Adding more codecs or transports in the future will no longer result in a
63+
combinatorial explosion of explicit template instantions due to the number
64+
of transport/codec combinations.
65+
- Codecs are now specializations of `SinkEncoder` and `SourceDecoder`.
66+
- Simplified codec tags to only provide their numeric ID.
67+
- Added `AnyCodec` polymorphic wrapper for codecs.
68+
- Added `Transporting` interface class which replaces the old Transport
69+
type requirement.
70+
- `internal::Client` is now non-templated and is retained by `Session` during
71+
the latter's lifetime.
72+
- `Session::connect` logic has been moved to `internal::Client`.
73+
- Renamed `internal::AsioTransport` to `internal::RawsockTransport` and
74+
simplified its previously convoluted design.
75+
- `internal::RawsockConnector` and `internal::RawsockTransport` now use
76+
policy classes instead of polymorphism to alter their behavior for tests.
77+
- Tidying of transport tests.
78+
- `internal::Peer` composition instead of inheritance.
79+
- Avoid unnecessary `boost::asio::post` in intermediate handlers.
80+
81+
### Beaking Changes
82+
83+
- `Session::call` can no longer be used for progessive call results, use
84+
`Session::ongoingCall` instead.
85+
- The `Session` destructor now automatically invokes `Session::disconnect`
86+
instead of `Session::terminate`, to better emulate the cancellation behavior
87+
of Asio sockets being destroyed.
88+
- `Event::executor` and `Invocation::executor` can no longer be directly used
89+
by Boost.Coroutine-based `boost::asio::spawn` to spawn coroutines.
90+
See workaround below in the Migration Guide.
91+
- The undecorated `Challenge::authenticate`, `Invocation::yield` and
92+
`Interruption::yield` are no longer thread-safe. See Migration Guide below.
93+
94+
### Migration Guide
95+
96+
- Replace `Session::create(args...)` with std::make_shared<Session>(args...),
97+
or instantiate Session as a stack or member variable.
98+
- Replace `connection<TCodec>(TcpHost)` with `TcpHost::withFormat`.
99+
E.g.: `wamp::TcpHost{"localhost", 12345}.withFormat(wamp::json)`
100+
- Replace `Session::call` with `Session::ongoingCall` when progressive results
101+
are desired.
102+
- Replace `Session::reset` with `Session::terminate`.
103+
- Replace `Session::userExecutor` with `Session::fallbackExecutor`
104+
- Manually call `Session::terminate` before a `Session` is destroyed if you
105+
must suppress the execution of pending completion handlers.
106+
- Replace `AsioContext` with `IoContext`.
107+
- When using `Event::executor` or `Invocation::executor` to spawn coroutines,
108+
use `wamp::spawnCompletionHandler` instead of `boost::asio::spawn`.
109+
- When calling `Challenge::authenticate`, `Invocation::yield` and
110+
`Interruption::yield` from multiple threads, use the new overloads taking the
111+
`ThreadSafe` tag type.
112+
- If checking for `ProtocolErrc` errors specifically, check for
113+
`SessionErrc::protocolViolation` instead.
114+
- Replace `Session::setWarningHandler` and `Session::setTraceHandler` with
115+
`Session::setLogHandler` and `Session::setLogLevel`.
116+
1117
v0.10.0
2-
======
118+
=======
3119
Asio completion token support and thread-safe Session operations.
4120

5121
- All asynchronous operations in Session now accept a generic

0 commit comments

Comments
 (0)