What really is the SOCKET type?
c++, sockets
Solution
In Win32, a `SOCKET` data type is the same as a `HANDLE`, which is an integer used to refer to a kernel data structure of some kind. This kernel data structure is "opaque", which means that application programs do not need to (and in fact cannot) see the internals of the structure. All access to Win32 `SOCKET`s is done through Winsock API functions.
Note that in Win16, a `SOCKET` was not the same thing because there was no Win16 `HANDLE` type. However, Win32 kept the same type name for source compatibility.
Problem
I can see it looks like an alias for an unsigned int pointer, right? Is it just like a pointer in memory? To what would it be actually pointing? Is it pointing to a struct? If yes, how is that struct defined? Is it just a number that is used by socket functions and does not map to a memory address?