This is good to understand the fundamentals.
But in a cross platform software I would use something like libuv since it provides a consistent interface around sockets on all platforms.
This is a throwback for me, big time; this guide singlehandedly helped me through my low-level networks course in college.
When I think about my college networking course I can almost see the words "Beej's Guide to Network Programming" at the top of that page. I must have spent 30% of my time in that class just reading that site. Not sure if I remember who wrote the text book though.