ESP32 BLE client, check if anyone is connected, if so turn ON the LED

Hi can anyone tell me if I can check if anyone is connected to my ESP32s bluetooth, and if so have any digital pin go HIGH?

Also where can I find all the BLE commands for the ESP32? Can't seem to find it anywhere and I only found a few examples in IDE which didn't help much

Thanks much

Can anyone please help me out with this?