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?
Share
In Win32, a
SOCKETdata type is the same as aHANDLE, 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 Win32SOCKETs is done through Winsock API functions.Note that in Win16, a
SOCKETwas not the same thing because there was no Win16HANDLEtype. However, Win32 kept the same type name for source compatibility.