mirror of
https://gitee.com/an-tao/drogon.git
synced 2024-11-29 18:27:43 +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> |
||
---|---|---|
.. | ||
HttpPipeliningTest.cc | ||
main.cc | ||
MultipleWsTest.cc | ||
WebSocketCoroTest.cc | ||
WebSocketTest.cc | ||
ws_test.html |