UDPSocket - How to not hog the port?

Hi all,

I have several devices on my network that use UDP to broadcast their existence. One of them sends out a periodic packet with its serial number, IP address, model number. It sends this on port 4992.

I know it is possible to do this, but not sure how to achieve it with Xojo. On a desktop app, I want to connect to port 4992, but I don’t want to block other programs from connecting and receiving the same data. For example the device control program also listens on 4992.

If I run my program which connects to that port, then the device control program never sees the packet from the device.

In the c# world I seem to remember something about setting up sharing of the port/IP but I don’t have an example to call on.

Anyone know how to do this?

I believe you need this:

e.g. reuse the port (and/or ip), the Monkeybread plugins can do this with UDP and TCP.
https://www.monkeybreadsoftware.net/network-udpsocketmbs-property.shtml#4

I don’t think xojo itself has this feature.

1 Like