WIN32 fixes signed/unsigned issues and slightly socket semantics.