i am developing an app that will control a multi-room audio system. I
have implimented the following, which works fine on my own network at
home (cable modem and D-Link DIR 855 router), but does not work on the
office DSL Motorola modem/router. Our iPhone app and our Pronto
ProntoScript app work at both locations, so I know that the multicasts
are being sent properly. Any ideas?
MulticastSocket ms = new MulticastSocket(CTInit.UDPPort);
InetAddress UDPAddress = InetAddress.getByName(CTInit.UDPIPAddress);
ms.joinGroup(UDPAddress);
while (true) {
DatagramPacket dp = new DatagramPacket(buffer, buffer.length);
ms.receive(dp);
mcData = new String(dp.getData(),0,dp.getLength());
It is hanging at ms.receive(dp), waiting to receive a multicast.
Just for more info, the ProntoScript (JavaScript) implementation, that
is working, looks like this, with the same port numbers and
IPAddresses:
UDPPortNumber = Number(UDPResult.PortNumber);
UDPIPAddress = String(UDPResult.IPAddress);
update = new UDPSocket(UDPPortNumber);
update.mcastJoin(UDPIPAddress);
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en