cocoa - Checking private network for local devices with a certain port open (iPhone/Objective C) -


i've spent whole day creating system between mac , iphone have used cocoaasyncsocket create listen server on mac , client on iphone. basic idea leave app on mac running while computer on , when wish transfer data iphone app, fire app connects , sends data... have system working how want function have 1 issue have been trying solve 4 hours in total!

i wanted create scans wireless network mac listener running... thought simple, wrong. have searched high , low no luck on case , using stackoverflow last resort.

my current plan "autoscan" retrieving internal ip of iphone (ie 192.168.1.94) use figure out other ip's on network (192.168.1.0-254), know ip's scan can loop through each 1 , check see if port open/i response.

now want quick possible haven't been able give me accurate results...

using connecttoaddress:error: in cocoaasyncsocket return true every 1 of 255 different ip addresses, other reachability functions have come across... have read because check see if connection gets made , don't care happens @ other end need think of else.

my other solution can think of, maybe ping each internal ip , see if response im not sure if going take time having go through 255 ip addresses... , then, once ip's active still have check see if port open somehow :/

if here knows how can done or has better idea how can check open port (i'm not networking) grateful.

thanks reading,

liam

i haven't worked myself bonjour looking it's purpose publishing , discovery of services


Comments

Popular posts from this blog

javascript - Iterate over array and calculate average values of array-parts -

iphone - Using nested NSDictionary with Picker -

objective c - Newbie question -multiple parameters -