May 26, 2018
Event loop and event-driven async socket base class
This is an abstract base class for objects backed by a socket which provides the basic framework for event-driven asynchronous IO, designed to be fast. DangaSocket is both a base class for objects, and an event loop.
Callers subclass DangaSocket. DangaSocket’s constructor registers itself with the DangaSocket event loop, and invokes callbacks on the object for readability, writability, errors, and other conditions.