Simple question - as users log into a network that I am already logged into, can I get their IP address and port number? I'm looking for the functionality of 'bonjour' on apple
Thanks Erel. I'm assuming the other devices would be running my app. Is there any way of using a wild card in the IP / port address so I could send out messages to all attatched devices snd they could send me their details (port num, etc).
I'm trying to develop a local area network chat system in which users simply log into the network and run my app to start. I'm using UDP.
I would probably provide a wireless router for users to log onto.
That said - it is possible to communicate directly to other users in a hotspot if you exchange IP addresses and port numbers. I know this works because I've tried it with my app in a number of venues without issues.
All I want is to be able to allow the users to bypass this manual exchange of IP addresses and port numbers.
you can use a socket connect loop going from 192.168.x.1 to 192.168.x.254 and when it connects successfully to the port you specified you're fine I guess.
you can use a socket connect loop going from 192.168.x.1 to 192.168.x.254 and when it connects successfully to the port you specified you're fine I guess.
Assuming that's the address range used. On larger networks, 10.x.x.x is also quite common.
However, just taking your own IP and then cycle through all the values in the last byte would work in most cases. Some networks would consider that a dis-allowed port scan, though.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.