Generic API to act as a non-blocking proxy when communicating with external protocols