Approach to create sockets API for C++17 similar to the NodeJS Socket API