fix OsSocket in win, TODO: check linux