cross platform wrapper of sockets in C++