开发者

How can I find the IP of a network service from the iPhone

开发者 https://www.devze.com 2023-01-28 23:27 出处:网络
I want to use some sort of nmap-like functionality to autodiscover a ASP.NET web server (r开发者_运维问答unning on port 443) somewhere on the network.This way users don\'t have to find and enter the I

I want to use some sort of nmap-like functionality to autodiscover a ASP.NET web server (r开发者_运维问答unning on port 443) somewhere on the network. This way users don't have to find and enter the IP manually. Is there a good/clean way to do this?


Thanks to @ceejaoz's comment above, I was able to do this pretty easily in Bonjour.

I used Mono.Zeroconf, a .NET/Mono Bonjour library, to advertise the service, and the default iOS NSNetService stuff to resolve it on the iPhone. (There's plenty of tutorials on how to do this around the nets).

I made a Windows Service in Visual Studio to actually run the code that advertises the ip and port, since a web service isn't really a good place for that.

One big caveat (as of December 2010): the Bonjour DLLs that come with Mono.Zeroconf are totally broken (no errors, they just don't do anything). Steal the ones from Pidgin instead.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号