{"author":"Viktor Szakats","author_email":"commit@vsz.me","author_time":1758368048,"commit_time":1758528690,"committer":"Viktor Szakats","committer_email":"commit@vsz.me","hash":"c9eff26c179222e7de077c0f59a6dfd9ba6dcce8","message":"tool_doswin: fix to use curl socket functions\n\nReplace `WSASocketW()` with `CURL_SOCKET()`. Also replace a call\nto `socketclose()` with `sclose()`. According to a comment,\n`socketclose()` was chosen to silence test 1498 (and 2300) reporting\n`MEMORY FAILURE`. These reports were accurate, and were caused by\ncalling `WSASocketW()` instead of `socket()` (now `CURL_SOCKET()`).\n\nThis also fixes the curl `sclose()` call on an error branch, which is\nnow correctly paired with a curl socket open. The mismatched open/close\ncalls caused an issue in TrackMemory-enabled (aka `CURLDEBUG`) builds.\n\nDocs confirm that `socket()` is defaulting to overlapped I/O, matching\nthe replaced `WSASocketW()` call:\nhttps://learn.microsoft.com/windows/win32/api/winsock2/nf-winsock2-socket#remarks\n\nAlso:\n- checksrc: ban `WSASocket*()` functions.\n- report `SOCKERRNO` instead of `GetLastError()` for socket calls,\n  to match the rest of the codebase.\n\nFollow-up to 9a2663322c330ff11275abafd612e9c99407a94a #17572\n\nCloses #18633\n","parents":["1f0f0bdb192a71b6b8b654115ee2c08f8411e356"],"tree_hash":"7230144a36283fa65caed1d78ea83a60121f293e"}