Asio
cppcon_add_library(complete LIBRARIES Asio::asio) add_subdirectory(tests)0 码力 | 1 页 | 74.00 B | 5 月前3CMake Configuration for Asio Basic Library and Tests
cppcon_add_library(basic LIBRARIES Asio::asio) add_subdirectory(tests)0 码力 | 1 页 | 71.00 B | 5 月前3Coroutines and Structured Concurrency in Practice
coroutines A lot of existing code mostly callback-based A custom-built I/O event loop predates Asio by a decade fine-tuned for specific use cases Somewhat conservative audience real benefit needs std::arraybuf(1024); asio::co_spawn( ex, [&s, &buf]() -> asio::awaitable { co_await s.read_some(s, asio::buffer(buf), asio::use_awaitable); }, asio::detached); } No way to figure out task lifetime => no automatic object lifetime managementDetached tasks considered harmful // don’t 0 码力 | 103 页 | 1.98 MB | 5 月前3deploying the networking TS
to handle query Front-end and back-end communicate with separate protocol Back-end implemented with Asio Queries serviced by proprietary database back-end (written in C++) 4 DataConn TCP protocol without templateauto with_pool(Configuration& config, thread_pool& pool); void thread_start(asio::io_context& ctx); }; 36 template struct connection_state { using query_type = template connection_state(asio::ip::tcp::socket s, asio::ip::tcp::endpoint local, asio::ip::tcp::endpoint remote, Configuration& config, WithPool& with_pool); 0 码力 | 44 页 | 892.77 KB | 5 月前3THE NETWORKINGTS FROM SCRATCH: IO Objects
Leahy - rleahy@rleahy.caNetworking TS & Asio ISO C++ Networking is blocked on Executors (P0443) Target for Networking is currently C++23 (P0592) Used standalone Asio (1.18.0) to prepare these slides Using Using the P0443-friendly extensions to the Networking TS shipping in “standalone” Asio & Boost.Asio (P0958) 2async_wait_then_write 3Composed Asynchronous Operations Composing asynchronous operations0 码力 | 35 页 | 900.82 KB | 5 月前3service
cppcon_add_library(service LIBRARIES Asio::asio) add_subdirectory(tests)0 码力 | 1 页 | 73.00 B | 5 月前3NoService 库
cppcon_add_library(no_service LIBRARIES Asio::asio) add_subdirectory(tests)0 码力 | 1 页 | 76.00 B | 5 月前3CMakeLists.txt
cppcon_add_library(async_initiate LIBRARIES Asio::asio) add_subdirectory(tests)0 码力 | 1 页 | 80.00 B | 5 月前3CMakeLists.txt
cppcon_add_test(basic SOURCES async_event.cpp main.cpp pending.cpp LIBRARIES Asio::asio Catch2::Catch2 basic)0 码力 | 1 页 | 112.00 B | 5 月前3CMakeLists.txt
cppcon_add_test(no_service SOURCES async_event.cpp main.cpp pending.cpp LIBRARIES Asio::asio Catch2::Catch2 no_service)0 码力 | 1 页 | 122.00 B | 5 月前3
共 76 条
- 1
- 2
- 3
- 4
- 5
- 6
- 8