3 ms·
> without the use of async/await > Do you need to keep custom structures for each network socket that maintains a snapshot of the state of how things are progr
by eqvinox 3y ago
> without the use of async/await
> Do you need to keep custom structures for each network socket that maintains a snapshot of the state of how things are progressing?
Yup.
Everything is a callback and you dispatch those from your event loop. You're managing/implementing your own closures by (manually/explicitly) throwing all necessary data into some data structure (essentially the "async" part). Then make appropriate callback registration calls and return from your code (equivalent to "await").