Network programming Win32

I have been looking for some good material for windows network programming. I know Casey will not be implementing multiplayer functionality so i wanted to try and figure it out by myself.

My question is if WinSock is the only alternative in C for Windows? So if handmade_hero would have network functionality would that be what we would have to use?

Edited by Pete on Reason: grammar
I don't know about C "alternatives". But the winsock library in windows, is not hard to get your head around. At least, considering the time you will spend to make your networkcode efficient, the time spent to connect a server to a client will not even count.
If you're going down the socket route with Winsock I'd highly recommend Beej's Guide to Network Programming (http://beej.us/guide/bgnet/). The more Windows-specific route would be I/O Completion Ports, but I've never found a need to go that route.
SuPete
My question is if WinSock is the only alternative in C for Windows?

Well, it's the "only alternative" in some sense but keep in mind that the WinSock API actually has lots of ways of doing the same thing, so you can use blocking send/recv, non-blocking send/recv, window message notification, IO completion ports, etc., etc. So there's actually lots of ways you can program it even if you're just talking about WinSock.

If we were to implement networking in Handmade Hero, it would definitely be what we would use, and I'm guessing we would probably use non-blocking send/recv if we could get away with it because that is cross-platform and would save time on porting.

- Casey
Thank you all for pointing me in the right direction, i guess i will start figuring out the WinSock API then.
I'll second what everyone said about Winsock, and that's a great choice if you want to stick with the "handmade from scratch" philosophy.

After reading through Beej's excellent guide, if you want something slightly higher level, I'd recommend take a look at enet (http://enet.bespin.org/) it takes care of a lot of the tricky bits and is geared towards games, without being too limiting.
This is a more complex library, but it is opensource and worth a look at as it was developed for games:
https://github.com/OculusVR/RakNet

Also, Glenn Fiedler has a list of amazing posts on networking (no code though):
http://gafferongames.com/networking-for-game-programmers/
Check this one....A simple Socket Programming sample

Chris