I don't understand this line...
surely rd == sizeof(id);
what is sizeof(SocketEndpointV4[2])?