My application require to run some custom command line utility, and read some data from it. In general case, this task is usually performed with popen, but popen is synchronous. Yes, it is possible to switch popen's i/o to async mode, but I need to bind unix sockets used by popen with trantor's event loop, and to register i/o completion callback. How to do this with Drogon and Trantor?
Generic async plugin
- Relevant Page: Plugins
antao2002 • 3 weeks ago
Yes, you are right. You could refer to the PgConnection class in orm_lib which implements an async connection to the postgresql server. The core component of it is the
trantor::Channel object with it users register their i/o completion callbacks.