UDP Socket in Class

Hi,
Kindly advice how to use UDP socket in Class?
I create the UDP socket1 as Class… But was unable to read the data in data available…

I have send the data using “Hercules Exe”

See /Applications/Xojo 2016 Release 3/Example Projects/Communication/Internet/UDPExample.xojo_binary_project

Thanks Michel Bujardet.

In that example , UDPsocket was in within window. But I need to set the UDPsocket as global.

You can attach it to App the same way as in the window, and you will be able to call its methods and properties with the prefix ‘app.’.