iOS. get other device/computer name by IP in the same local network

后端 未结 2 760
天涯浪人
天涯浪人 2021-01-21 00:31

One task of my program is to scan local wi-fi network for any devices/computers in same network. I found solution to get all working devices IPs, but did not managed to get name

2条回答
  •  [愿得一人]
    2021-01-21 00:52

    BOOL succeeded = CFHostStartInfoResolution(hostRef, kCFHostNames, NULL); Now I encounter that always failed at this line, and I tried to use getnameinfo function, it is still can't get the hostname

提交回复
热议问题