[PATCH] Increased winsock2 maximum sockets
Zebediah Figura (she/her)
zfigura at codeweavers.com
Tue Jan 25 11:19:50 CST 2022
On 1/25/22 08:26, Ben Shefte wrote:
> Maximised socket amount substantially to allow games and streaming applications that fail after using 128 sockets.
>
> reference:
> https://stackoverflow.com/questions/14471964/fd-size-and-maximum-number-of-sockets-an-application-can-use-in-windows
>
> Signed-off-by: Ben Shefte<shefben at gmail.com>
> ---
> dlls/ws2_32/socket.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c
> index fe7e4fb3464..a44c38285cc 100644
> --- a/dlls/ws2_32/socket.c
> +++ b/dlls/ws2_32/socket.c
> @@ -419,7 +419,7 @@ static BOOL socket_list_remove( SOCKET socket )
> return FALSE;
> }
>
> -#define MAX_SOCKETS_PER_PROCESS 128 /* reasonable guess */
> +#define MAX_SOCKETS_PER_PROCESS 32767 /* reasonable guess */
> #define MAX_UDP_DATAGRAM 1024
> static INT WINAPI WSA_DefaultBlockingHook( FARPROC x );
>
This could do with some tests, and in particular tests for different
version numbers passed to WSAStartup().
While you're at it, I think there's no reason to keep this in a #define
near the top of the file; it's only used in one place.
Also, do you have a specific application that requires this?
More information about the wine-devel
mailing list