v0.3.0
·
17 commits
to master
since this release
- BREAKING
asyncgi::Routernow depends onasyncgi::IO:
auto io = asyncgi::IO{};
auto router = asyncgi::Router{io};
- BREAKING
ErrorHandlerwas replaced withEventHandlerProxy- a flexible callback system allowing backwards-compatible extension.
Currently only error event handlers are supported with the signaturevoid(asyncgi::ErrorEvent, std::string_view);
Event handler is passed as the last parameter to theasyncgi::IOobject's constructor:
auto io = asyncgi::IO{[](asyncgi::ErrorEvent, std::string_view errorMsg){ std::cerr << errorMsg << "\n";}};
It's planned to add an optional logger based on this system in the future releases. The event handling will be documented then.