All Projects → jgaa → modern_async_cpp_example

jgaa / modern_async_cpp_example

Licence: other
Just some example code from a lecture about modern async C++

Programming Languages

C++
36643 projects - #6 most used programming language

Projects that are alternatives of or similar to modern async cpp example

boost beast websocket echo
A collection of Demo applications to try to help you understand how Asio and Beast work
Stars: ✭ 12 (-64.71%)
Mutual labels:  coroutines, asio
act
ASIO Cooperative Task for await-based coroutine
Stars: ✭ 16 (-52.94%)
Mutual labels:  coroutines, asio
Restc Cpp
Modern C++ REST Client library
Stars: ✭ 371 (+991.18%)
Mutual labels:  coroutines, asio
mvvm android
A simple android app written in Kotlin with the MVVM architecture, room database, retrofit and coroutines.
Stars: ✭ 13 (-61.76%)
Mutual labels:  coroutines
kcptun-asio
A kcptun based on c++11/asio, compatible with kcptun(golang)
Stars: ✭ 74 (+117.65%)
Mutual labels:  asio
KotlinEverywhere
This application created for Kotlin Everywhere series as a codelab. It will show step by step Kotlin and Android Jetpack Components fundamentals. 🚀🚀
Stars: ✭ 52 (+52.94%)
Mutual labels:  coroutines
floppy
🧩 Handling and maintain your UI view component easily
Stars: ✭ 55 (+61.76%)
Mutual labels:  coroutines
android
🌦 Vädret
Stars: ✭ 17 (-50%)
Mutual labels:  coroutines
DotNetWithCMake
Your swiss army knife for creating .NET assemblies with CMake and integrating unmanaged code.
Stars: ✭ 50 (+47.06%)
Mutual labels:  example-code
NewsPin
News app for android using Kotlin, coroutines, MVP architecture
Stars: ✭ 25 (-26.47%)
Mutual labels:  coroutines
StatefulLiveData
StatefulLiveData is a lean, yet powerful tool that harnesses the capabilities of LiveData and enhances them, enabling the observer to distinguish between different states the data can be in, such as Success, Loading and Error.
Stars: ✭ 18 (-47.06%)
Mutual labels:  coroutines
SierraChartZorroPlugin
A Zorro broker API plugin for Sierra Chart, written in Win32 C++.
Stars: ✭ 22 (-35.29%)
Mutual labels:  asio
SuspendActivityResult
A lightweight library for requesting and consuming Activity Results using coroutines.
Stars: ✭ 71 (+108.82%)
Mutual labels:  coroutines
kotlin-monads
Monads for Kotlin
Stars: ✭ 114 (+235.29%)
Mutual labels:  coroutines
StarWarsSearch-MVI
Star wars sample android project showcasing the use of View components for rendering UI in Fragments and Activities. Uses Android Jetpack, clean architecture with MVI (Uni-directional data flow), dagger hilt, and kotlin coroutines with StateFlow
Stars: ✭ 189 (+455.88%)
Mutual labels:  coroutines
asyncio
A C++ implementation of an industrial-grade high-performance asynchronous network library, based on asio, similar to Python's asyncio, designed for stateful services, and can be used to quickly build a variety of online game servers, microservices and pressure testing tools
Stars: ✭ 48 (+41.18%)
Mutual labels:  asio
Multi-Module-Nextflix-Composable
Includes jetpack compose, navigation, paging, hilt, retrofit, coil, coroutines, flow..
Stars: ✭ 195 (+473.53%)
Mutual labels:  coroutines
tinyrpc
Much fast, lightweight, async, based boost.beast and protobuf.
Stars: ✭ 32 (-5.88%)
Mutual labels:  asio
CoroutineLite
Simple implementation of kotlinx.coroutines to clarify the design of Kotlin Coroutines.
Stars: ✭ 142 (+317.65%)
Mutual labels:  coroutines
Game-Examples
Godot game examples for gotm.io - the Godot Platform!
Stars: ✭ 27 (-20.59%)
Mutual labels:  example-code
This mini-project consists of some examples I wrote for a
30 minutes mini-lecture about modern async C++.

In order to put the modern code in perspective, I implemented
the same algorithm three times. First, "traditional.cpp" using
blocking IO. Then, in "async.cpp" I show how most people
would implement it today, using scattered methods and callbacks.
And last in "modern.cpp", I show how elegantly it can be done
with recent versions of boost::asio, using coroutines in stead
of callbacks. The code is async, but it looks just as simple as
traditional blocking code. As an extra bonus, the stack is
intact, so if your program crash, you will have much more
accurate information than in the async case.

The code is very simple; it resolves a host-name, loops over
the received IP numbers until it connects (or fails to connect
to any of them). When connected, it sends a minimalistic
HTTP request to the address, and prints the server-response
directly to the standard output.

The code is compiled with clang 3.5 and g++ 4.9.1

I put this code in the public domain.

Jarle (jgaa) Aase, December 2014.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].