If you're using C++ I would highly recommend that you look at using Boost.Asio it's a great asynchronous networking library that will have you reaching you're goals a LOT faster than using sockets directly.
Obviously it's a great idea to learn the network stuff from the ground up, but I think that it is highly beneficial to do that with a good (and easy to use) library to back you up so you can get results too.