On 24.11.2015 19:07, Bruno Jesus wrote:
After some time struggling with the server I finally managed to produce a working version of the idea of bringing all sockets from server to winsock and then closing all of them. Tested with 1026 sockets and seems to work as expected by bringing 128 sockets per request from the server.
This is certainly too much for code freeze but I plan to send after it, feedback is very much welcome since mistakes are always possible when working after midnight.
Best wishes, Bruno
I'm not sure, but probably the following, slightly modified idea would be preferred. On Windows there is also a way to enumerate all handles: SystemHandleInformation. I have already started writing patches for this:
https://github.com/wine-compholio/wine-staging/tree/master/patches/ntdll-Sys...
If tests confirm that WSACleanup really closes all sockets, including those created with DuplicateHandle(), then we could use this ntdll API to enumerate them. Even if we decide not to use the ntdll API, we could at least use one shared wineserver call for both.
Nevertheless, similar to your approach, I do not see any chance to get this upstream now during the feature freeze. Applications might start using it, and then fail if something doesn't work as expected - so its better to wait. ;)
Regards, Sebastian