C++ Socket Abstraction