virtual void addCleanup(std::type_index type, void *iface, std::function< void()> cleanup)=0
Add cleanup callback to interface that will run when the interface is deleted.
virtual void listen(int listen_fd, const char *exe_name, interfaces::Init &init)=0
Listen for connections on provided socket descriptor, accept them, and handle requests on accepted co...
virtual void serve(int fd, const char *exe_name, interfaces::Init &init, const std::function< void()> &ready_fn={})=0
Handle requests on provided socket descriptor, forwarding them to the provided Init interface.
virtual std::unique_ptr< interfaces::Init > connect(int fd, const char *exe_name)=0
Return Init interface that forwards requests over given socket descriptor.
Context struct used to give IPC protocol implementations or implementation hooks access to applicatio...