|
drogon
C++14/17-based HTTP application framework
|
#include <trantor/utils/NonCopyable.h>#include <trantor/net/EventLoop.h>#include <trantor/utils/Logger.h>#include <algorithm>#include <atomic>#include <cassert>#include <condition_variable>#include <coroutine>#include <exception>#include <future>#include <mutex>#include <type_traits>#include <optional>
Go to the source code of this file.
Namespaces | |
| namespace | drogon |
| Drogon Test is a minimal effort test framework developed because the major C++ test frameworks doesn't handle async programs well. Drogon Test's syntax is inspired by both Google Test and Catch2. | |
Typedefs | |
| template<typename T> | |
| using | drogon::internal::void_to_false_t |
| template<typename T> | |
| using | drogon::await_result_t = typename await_result<T>::type |
Functions | |
| template<typename T> | |
| auto | drogon::internal::getAwaiterImpl (T &&value) noexcept(noexcept(static_cast< T && >(value).operator co_await())) -> decltype(static_cast< T && >(value).operator co_await()) |
| template<typename T> | |
| auto | drogon::internal::getAwaiterImpl (T &&value) noexcept(noexcept(operator co_await(static_cast< T && >(value)))) -> decltype(operator co_await(static_cast< T && >(value))) |
| template<typename T> | |
| auto | drogon::internal::getAwaiter (T &&value) noexcept(noexcept(getAwaiterImpl(static_cast< T && >(value)))) -> decltype(getAwaiterImpl(static_cast< T && >(value))) |
| template<typename Await> | |
| auto | drogon::sync_wait (Await &&await) |
| template<typename Await> | |
| auto | drogon::co_future (Await &&await) noexcept -> std::future< await_result_t< Await > > |
| internal::TimerAwaiter | drogon::sleepCoro (trantor::EventLoop *loop, const std::chrono::duration< double > &delay) noexcept |
| internal::TimerAwaiter | drogon::sleepCoro (trantor::EventLoop *loop, double delay) noexcept |
| internal::LoopAwaiter | drogon::queueInLoopCoro (trantor::EventLoop *workLoop, std::function< void()> taskFunc, trantor::EventLoop *resumeLoop=nullptr) |
| internal::SwitchThreadAwaiter | drogon::switchThreadCoro (trantor::EventLoop *loop) noexcept |
| internal::EndAwaiter | drogon::untilQuit (trantor::EventLoop *loop) |
| template<typename Coro> | |
| void | drogon::async_run (Coro &&coro) |
| Runs a coroutine from a regular function. | |
| template<typename Coro> | |
| std::function< void()> | drogon::async_func (Coro &&coro) |
| returns a function that calls a coroutine | |
| template<typename T> | |
| internal::EventLoopAwaiter< T > | drogon::queueInLoopCoro (trantor::EventLoop *loop, std::function< T()> task) |
| Run a task in a given event loop and returns a resumable object that can be co_awaited in a coroutine. | |
| template<typename... Tasks> | |
| internal::WhenAllAwaiter< Tasks... > | drogon::when_all (Tasks... tasks) |
| template<typename T> | |
| internal::WhenAllAwaiter< std::vector< Task< T > > > | drogon::when_all (std::vector< Task< T > > tasks) |
| internal::WhenAllAwaiter< std::vector< Task< void > > > | drogon::when_all (std::vector< Task< void > > tasks) |
Variables | |
| template<typename T> | |
| constexpr bool | drogon::is_awaitable_v = is_awaitable<T>::value |
| template<typename T> | |
| constexpr bool | drogon::is_resumable_v = is_resumable<T>::value |
Copyright 2021, Martin Chang. All rights reserved. https://github.com/an-tao/drogon Use of this source code is governed by a MIT license that can be found in the License file.
Drogon
| using drogon::internal::void_to_false_t |