0

I want to be able to have multiple iPads on a single LAN running the same app each with the ability for peer to peers broadcast.

This needs to be peer to peer broadcast (serverless) or if I have to, then I can designate one app as the local server to receive and resend events. But the information should never leave the LAN (so no cloud server).

A simple example would be an app that has a single button. Each instance of this app would be configured with a unique ID (say 1-10). When any user touches that button anywhere on the LAN all the other iPads running this app would display the number of the app instance elsewhere on the LAN where the button has been pushed.

This seems like it should be a basic capability but I am having a hard time finding if it is even possible in IOS. Can anyone confirm that it is and how to do it?

Kerry Davis
  • 171
  • 1
  • 4
  • 12

1 Answers1

0

You could set it to broadcast on the broadcast ip of the lan. and use it like a multicast address.

ex. 192.168.1.0/24 broadcast/listen on 192.168.1.255

the only downfall is that it will be sent to every device on the lan.

[edit] vv

or if you designate one as the server you could advertise the servers ip address as a broadcast.

Joe
  • 109
  • 1
  • 8
  • I don't think sending to every device would be a problem as the ones not looking for it would simply ignore it and this would represent very little traffic (short packet sent maybe once a second at most). So I can set up a listener to interrupt my app when a packet come in on this broadcast port? Or do I have to poll that port? Is there any example code you know of to do this? – Kerry Davis Jun 19 '12 at 18:39
  • I assume similar to this? http://stackoverflow.com/questions/9674450/recieve-udp-broadcast-packets-ios – Kerry Davis Jun 19 '12 at 18:42
  • it's not a port but apart of the subnet. most routers use 192.168.1.1 I have more knowledge on the networking side but can relate it to programming. implementing this is a little over my head. – Joe Jun 20 '12 at 04:45