winsock wsastartup/cleanup handling added.
merge conflicts