There are more uses for coroutines than just making working with promises easier. In this post we're diving into the
details on how they are used by the Friends of ReactPHP in the
PSR-15 Middleware adapter for
react/http
.
In the previous post we've covered the basics of coroutines. In this post we're going to build a munin-node client specifically to fetch switch port traffic counters. During this post we not just write an munin-node client, we also deal with some domain logic. All code examples contain comments about what is going on and why. There is a lot of knowledge in those as well so be sure to read the comments.
Getting your mind wrapped around async nature can be mind bending at first. But with RecoilPHP
you can write code promise as if you're writing sync code.