You can use the show control functions of the CueCore2 to create an playback actionlist and create an action using the cue change trigger and create a task that will send a udp message to the desired ip including a message you decide and the cue number.
If you decide to use some API commands to control the Cuecore, then the cuecore will remind the IP addresse from where he received the commands and will automatically send udp messages to this ip addresse everytime a cue is changing.