#15562: Use ws2_32.dll (Winsock 2) instead of the ancient wsock32.dll (Winsock 1.1)
------------------------+---------------------------------------------
Reporter: justinian | Owner:
Type: defect | Status: confirmed
Priority: normal | Milestone: 3.1.6
Component: wxMSW | Version: stable-latest
Resolution: | Keywords: winsock winsock2 pragma linking
Blocked By: | Blocking:
Patch: 1 |
------------------------+---------------------------------------------
Changes (by NewPagodi):
* cc: m0081@… (added)
Comment:
The winsock SocketPoller I wrote for wxWebSessionCURL on windows uses
WSAAsyncSelect which is deprecated in winsock2.
Right now I don't see a good way to write a socket poller in winsock2
other than to use WSAWaitForMultipleEvents in a worker thread. And since
WSAWaitForMultipleEvents has a 64 socket limit, I guess the socket poller
would need to use as many threads as necessary.
From what I understand, Microsoft wants people to use overlapped IO and
use functions like [WSARecv](
https://docs.microsoft.com/en-
us/windows/win32/api/winsock2/nf-winsock2-wsarecv) to do the reads
asynchronously. But that's not really something we can do since we want
libcurl to do the actual reading/writing. We just want to monitor the
socket so we know when to tell it to do that.
Does anyone know of a good way to monitor a socket to see when it is ready
for activity in winsock2.
--
Ticket URL: <
https://trac.wxwidgets.org/ticket/15562#comment:10>