Interface between SITL elf and simulators?

I’m trying to develop a simple dynamic simulator for betaflight and am having trouble figuring out how ArduCopter elf files communicate with simulators. I understand it is over UDP (according to this page) but I can’t find details about the protocol or API used. Does anyone know if that is documented somewhere or if there is a clean simulator example I can look at?