mirror of
https://gitee.com/an-tao/drogon.git
synced 2024-12-02 11:47:56 +08:00
a2142dd93e
* app().registerHttpHandler() accepts coroutine as handlers * HttpController can use coroutine as handlers' * Http request handlers with coroutine catches exception instead of crashing the entire app * DbClient now has execSqlCoro that is awaitable * DbClient now has newTransactionCoro that is awaitable * HttpClient have awaitable sendRequestCoro * WebSocketClient have awaitable connectToServerCoro * WebSocketClient have setAsyncMessageHandler and setAsyncConnectionClosedHandler * drogon::AsyncTask and drogon::Task<T> as our corutine types * Related tests * Misc Future work * Coroutine for WebSocket server * Known issues co_future() and sync_wait may crash. It looks like GCC bug but I'm not sure. Workarround: Make an coroutine of AsyncTask. Then launch said coroutine. Not sure why wrapping the exact same thing in function crashes things. Co-authored-by: an-tao <antao2002@gmail.com> |
||
---|---|---|
.. | ||
benchmark | ||
client_example | ||
simple_example | ||
simple_example_test | ||
simple_reverse_proxy | ||
CMakeLists.txt | ||
README.md |
Drogon Examples
The following examples can help you understand how to use Drogon:
- benchmark - Basic benchmark example. see wiki benchmarks
- client_example - A client example.
- simple_example - A simple example showing how to create a web application using Drogon.
- simple_example_test - Some tests for the
simple_example
. - simple_reverse_proxy - A Example showing how to use drogon as a http reverse proxy with a simple round robin.
TechEmpower Framework Benchmarks test suite
I created a benchmark suite for the tfb
, see here for details.
Another test suite
I also created a test suite for another web frameworks benchmark repository, see here, in this project, drogon is used as a sub-module (locally include in the project).