Drastically reduce complexity of the multiplexer
When we started with caf-net in the incubator, socket managers had minimal control flow and the read and write handlers could simply return whether they wished to be called again later again. With SSL and its `want_read` and `want_write` shenanigans, things got a whole lot more complicated and the old return-next-operation model stopped being a good fit. And finally, asynchronous events that trigger reads and writes without prior socket events made this approach pretty much fell apart and there were in fact two paths to influence the event mask for a socket manager: the return value of the handlers and `register_(reading|writing)` functions. With this redesign, read and write handlers no longer return anything. All bookkeeping for the event mask exclusively relies on `register_(reading|writing)` functions. The new design also drops `resume_reading` and simply adds more capabilities to lower layers to (re-) start reading at any time using actions.
Showing
Please register or sign in to comment