Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Broadcast / Multicast



Permlink Replies: 1 - Last Post: Jan 13, 2016 10:37 PM Last Post By: Remy Lebeau (Te...
Eduardo Elias

Posts: 319
Registered: 9/20/12
Broadcast / Multicast
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 13, 2016 4:46 PM
I made a small test app that could send UDP broadcast on the local network
and and a client could get it.

Using TidUDPServer / Client ( XE2 )

However, I have 2 routers at home, and the UDP broadcast does not cross to
another subnet

I am looking for a way to let some client application that an updated information
is available, so they can retrieve using http.

Right now using UDP brodcast it works fine, but it could have cases where
is needed more than one wifi router for androids to access it, and I need
to send a message to all of them.

Not sure if that is multicast, it is important that no special router should
be needed, I need to do that based on common wifi routers available.

Any ideas?

Thanks !

Eduardo
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: Broadcast / Multicast
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 13, 2016 10:37 PM   in response to: Eduardo Elias in response to: Eduardo Elias
Eduardo wrote:

However, I have 2 routers at home, and the UDP broadcast does not
cross to another subnet

That depends on the router's configuration. Some routers do not allow UDP
to cross subnets at all. Some routers allow UDP to cross subnets, but usually
disable it by default (to avoid DoS attacks), or have a configuration to
allow specific subnets/ports. Check your router settings.

I am looking for a way to let some client application that an updated
information is available, so they can retrieve using http.

If your router does not allow UDP to cross subnets, there is nothing you
can do about that. You will have to publish the update info somewhere else.
Or, simply have the HTTP client poll the server periodicailly. You can
use a Conditional GET using "If-Modified-Since" and/or "ETag" headers to
minimize network traffic by not re-sending data the client already has.

Not sure if that is multicast

Multicast allows clients to explicitly subscribe to a specific multicast
group, and then packets sent to the group are delivered to all members.
A multicast-enabled router will keep track of the subscription requests and
forward packets accordingly. This way, only interested parties will receive
the packets, unless a UDP broadast that goes to every machine on the subnet.
However, whether multicast is allowed to cross subnets is, again, router-specific.

it is important that no special router should be needed

Not all routers support multicast, and those that do usually have settings
to enable/disable it.

--
Remy Lebeau (TeamB)
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02