Receiving a UDP message

Hello all

Im looking in to a little project to receive UDP messages from an existing application, translate them in to OSC messages, and send them on to a 3rd party (likely QLab). I’m pretty comfortable with the OSC side of this but I having real trouble with the UDP side. all I need to do is receive a message and store it in a variable for manipulation but im not getting anywhere.

I know I have to create a DatagramSocket and bind it to a port but from there i’m afraid i’m getting lost . does anyone know of any examples or tutorials that deal with reading UDP? any help on this would be very very much appreciated.

Is there a way to ignore the format of an OSC message and receive it none the less? I think this might solve my problem.

You’re almost there; Create the DatagramSocket, bind it to the port (and all interfaces) and either continuously call read() or use the waitUntilReady() method to check if the socket has any readable data.