ws2_32: WSACleanup cleans up open sockets (OSX only)

Henri Verbeet hverbeet at gmail.com
Tue Aug 25 09:09:58 CDT 2015


On 25 August 2015 at 06:46, Ken Thomases <ken at codeweavers.com> wrote:
>> On Aug 24, 2015, at 10:49 PM, Matt Durgavich <mattdurgavich at gmail.com> wrote:
>> +#define CACHE_SIZE  256
>> +#define CACHE_DEPTH 16
>> +static SOCKET socket_cache[CACHE_SIZE][CACHE_DEPTH];
>> +
>> +/* Cache support */
>> +static void add_to_cache(SOCKET s);
>> +static BOOL remove_from_cache(SOCKET s);
>> +static BOOL socket_in_cache(SOCKET s);
> I'm not sure this is a "cache", per se. It's a hash table, but naming issues are fairly minor.
>
If the idea is just to keep track of all the sockets you give out you
want neither of those of course, but just something like a handle
table or a list.



More information about the wine-devel mailing list