in previous question i try to get all valid ip addresses in a subnet , so i use for loop , but after i try it , i find that my code takes more that 2 minutes to find an all ip addresses in a sub net , and in some cases it's take more than 5 minutes!
My code is writing in C++ under Mac OS ;
but in windows , to do the same thing you only write net view/all
command , and it print all ip addresses in a subnet in a moment !
and in MAC os you can use Bonjour service
to do such job .
how these techniques work like this speed (Net view /all
and Bonjour service
) ?
is there any way to do this job very fast like this ?
if not please tell me if is it there is APi to use Bonjour service directly into my code (C++) in mac os?
EDIT:
i found new idea
i found on apple develop some api called Bonjour API , my be it's help ,but how i can use it i c++ , because i know that mac use opbjectiv-c .