Socket programming examples in C++