Home > Mobile >  The same local area net different phone UDP communication problems (some can receive, some don'
The same local area net different phone UDP communication problems (some can receive, some don'

Time:10-22

I have more than one android phone (and tablet) even at home in the local area net, and then want to use a sends a message to other,
I'm going to sent via UDP broadcast the way to do this, then wrote a simple UDP broadcast program
The program starts, will be on a given port to monitor, and then press the button to send all devices within the LAN of the port a UDP message,
I have A total of three devices (hammer mobile phone, A millet mobile phone, B C millet tablet), test results are as follows:

Send A message: only in yourself to receive A
B sends A message: themselves and have received A B, C not receive
C sends the message: don't get C and to receive A, B


I tried a lot of day, in the Internet that the lock. The acquire ()/lock. The release (), but the results, don't know how to see your great god?

CodePudding user response:

The great god help ah, oneself the top, please

CodePudding user response:

O, then top up and pray to god to see

CodePudding user response:

That I may say is not good, but I suggest that you might as well use a device directly as a server, all this server equipment communication message forwarded to the appropriate equipment, feel so good

CodePudding user response:

Meet the same problem, the building Lord solved??????? I have 13 equipment, ten times can search to 13, the occasional one or two search to a less equipment, how to solve this problem, can't guarantee every time can get accurate data, how to solve???????
  • Related