Yes, that works, but I don't think WSAxxx functions are portable to other platforms, as WSA stands for WindowsSocket(something) I think. I don't really care, since I'm only ever going to use Windows unless MS does something really bad, but I heard somewhere that usually portability is good