Fix socketWrite fix for windows