Getting IP addresses of the PC's available on

2019-04-16 07:31发布

I am able to establish connection between android and PC via Wi-fi. But this is done by hard coding the the IP address of the PC (server) in the android program. But I wanted to get IP addresses of the PC's available on the Wi-fi network programmatically. So please let me know how to scan for PC's on the network and get their respective IP address.

1条回答
趁早两清
2楼-- · 2019-04-16 08:17

can you not multicast a UDP packet on the network which the server listens for and responds to with a packet containing the ip address of the server in order to set up the connection?

You should be able to find help on that topic, with some options here here and here

查看更多
登录 后发表回答