In c# I am using the UdpClient.Receive function:
public void StartUdpListener(Object state) { try { udpServer = new UdpClient
for your purposes I believe you will want to use IPAddress.Any instead of IPAddress.Broadcast. Hope this helps!