How to Use C++20 Coroutines for Networking

How to Use C++20 Coroutines for Networking

11:00 - 12:30 Friday 8th April 2022 BST




This talk shows how to write an event-driven 'chat' program using C20 coroutines. Coroutines improve the process of writing event-driven code and this talk provides a worked example of how to do so. Practical strategies for how to design, debug and reason about such architectures are given. The talk opens by introducing a familiar callback version of 'chat' that is based on Boost.Asio. The talk then shows how the same application can be coded using C20 coroutines. The performance of the two approaches is compared empirically and a number of observations are made.


Jim Pascoe

I love all things related to modern C++ and Lua. I am particularly interested in the areas of networking and concurrency. I am a lead programmer working for Blu Wireless to create a high-bandwidth 'track-to-train' radio area network for large rail deployments (based on 802.11ad).

Your Privacy

By clicking "Accept Non-Essential Cookies" you agree ACCU can store non-essential cookies on your device and disclose information in accordance with our Privacy Policy and Cookie Policy.

Current Setting: Non-Essential Cookies REJECTED

By clicking "Include Third Party Content" you agree ACCU can forward your IP address to third-party sites (such as YouTube) to enhance the information presented on this site, and that third-party sites may store cookies on your device.

Current Setting: Third Party Content EXCLUDED

Settings can be changed at any time from the Cookie Policy page.