Phillip Macdonald
Phillip Macdonald

Reputation: 434

Android Port scanning for TCP server?

I have a TCP server running on a specified port (23232), and an Android app that needs to connect to the IP and Port of this server. Is it possible to obtain the IP by scanning for a port only? I have media player control apps that do this but I have no idea how to implement it.

Thanks in advance.

Upvotes: 0

Views: 269

Answers (1)

aosmond
aosmond

Reputation: 61

This is on a local network, correct? I would recommend that you use a multicast service discovery mechanism via UDP, since this is the exact kind of scenario it is intended for. Fixed port, unknown entities on the LAN providing the service.

Upvotes: 1

Related Questions