UDPSocket.RouterHops

From Xojo Documentation

Property (As Integer )
aUDPSocket.RouterHops = newIntegerValue
or
IntegerValue = aUDPSocket.RouterHops

Supported for all project types and targets.

Specifies how many router hops the data sent out can make.

Notes

Multicasting has some extra features that make it an even more powerful utility for network applications. If you wish to receive the data you sent out with a multicast send, you can set the SendToSelf property (also known as loopback) of the UDPSocket. If it is set to True, then when you do a send (to a multicast group) you will get that data back. You can also set the number of router hops a multicast datagram will take (This is also known as the Time To Live (or TTL). When your Datagram gets sent out, it runs through a series of routers on the way to its destinations. Every time the Datagram hits a router, its RouterHops property gets decremented. When that number reaches zero, the Datagram is destroyed. This means you can control who gets your datagrams with a lot more precision. There are some “best guesses” as to what the value of RouterHops should be.

Value Description
0 Same host
1 Same subnet
32 Same site
64 Same region
128 Same continent
255 Unrestricted

Note that if your Datagram runs through a router that does not support multicasting, it is killed immediately.

Example

EasyUDPSocket1.RouterHops = 32