The cServer conversion to the new cNetwork API is hindered by the terrible object ownership definitions that are currently in place. It needs to be changed because the network API expects shared pointers to stuff, but it's so difficult to change!
The server creates the ClientHandles, and owns them. But only until they join a world, then their ownership gets transfered to the world. When they teleport to another world, their ownership is first transferred back to cServer and then to the destination world.
The Player is owned by the ClientHandle, but still needs to access the ClientHandle by its SharedPtr, so it needs to store the SharedPtr to ClientHandle, but must give it up before the ClientHandle is destroyed, otherwise the ClientHandle's destructor doesn't get called. Mess mess mess.
The server creates the ClientHandles, and owns them. But only until they join a world, then their ownership gets transfered to the world. When they teleport to another world, their ownership is first transferred back to cServer and then to the destination world.
The Player is owned by the ClientHandle, but still needs to access the ClientHandle by its SharedPtr, so it needs to store the SharedPtr to ClientHandle, but must give it up before the ClientHandle is destroyed, otherwise the ClientHandle's destructor doesn't get called. Mess mess mess.