From: "Zebediah Figura (she/her)" Subject: Re: [PATCH] Increased winsock2 maximum sockets Message-Id: Date: Tue, 25 Jan 2022 11:19:50 -0600 In-Reply-To: <20220125142623.1188619-1-shefben@gmail.com> References: <20220125142623.1188619-1-shefben@gmail.com> 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 > --- > 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?