Hi there,
My use case needs me to integrate several servers and clients, for several different protocols, within the one Python process and asyncio event loop. One of the main reasons for this is for efficient passing of data objects between different clients/servers.
What’s the best way to include a Sanic app in this context, and to launch a Sanic HTTP/S server task, within the existing event loop? I notice that the “official” use pattern is to instantiate a Sanic[-derived] object, then invoke its blocking .run() method.
I need instead to be able to have an existing loop running with other tasks, and be able at will to launch and terminate one or more Sanic server tasks within that loop.
Cheers
David