Hi,
I want my app could auto find the ip address of server.
I used udp broadcast to remind server then server will send a udb package to my mobile device.
Mobile can refer the source address of the package to setup ip address of server.
My problem is, the general broadcast address(255.255.255.255) cannot work correctly,
I need subnet mask to caculate the broadcast address. For example:
ip address is:192.168.1.1
subnet mask is:255.255.128.0
the broadcast address will be: (192.168.1.1 |...
How to get subnet mask on mobile device
I want my app could auto find the ip address of server.
I used udp broadcast to remind server then server will send a udb package to my mobile device.
Mobile can refer the source address of the package to setup ip address of server.
My problem is, the general broadcast address(255.255.255.255) cannot work correctly,
I need subnet mask to caculate the broadcast address. For example:
ip address is:192.168.1.1
subnet mask is:255.255.128.0
the broadcast address will be: (192.168.1.1 |...
How to get subnet mask on mobile device