On 25 August 2015 at 06:46, Ken Thomases ken@codeweavers.com wrote:
On Aug 24, 2015, at 10:49 PM, Matt Durgavich mattdurgavich@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.