Socket class in c++