The last line concerns me; why is it setting _sock to MAX_SOCK_NUM?
If MAX_SOCK_NUM is 4, then the valid socket descriptors would be 0, 1, 2, and 3. To make _sock not contain a valid descriptor when the socket it was referring to is no longer being referred to, it needs to contain some non-valid value. That could be -1 or more than the maximum number of sockets.
If _sock is unsigned, that precludes setting it to -1. So, all that is left is setting it to the maximum number of sockets.