[英]Pinging www.apple.com ports
I building small utility iOS App with GCDAsyncSocket that will ping ports on www.apple.com: list of ports . 我使用GCDAsyncSocket构建小型实用程序iOS App,它将对www.apple.com: 端口列表上的端口执行 ping操作。
For example, trying to connect on TCP port 80 and 443 I got "connected" status, but when I try 2195 and 2196 I get "timeout". 例如,尝试在TCP端口80和443上连接时,我的状态为“已连接”,但是当我尝试2195和2196时,则为“超时”。
When trying to connect to ports with GCDAsyncUdpSocket, whichever port I try to connect I get "connected", even though some ports aren't open (tested with nmap which returns "closed"). 当尝试使用GCDAsyncUdpSocket连接到端口时,无论我尝试连接的哪个端口,我都会“连接”,即使某些端口未打开(使用nmap测试后返回“关闭”)。
So, I have couple of questions: 因此,我有几个问题:
1) Am I doing something wrong when trying to connect to ports 2195, 2196, etc? 1)尝试连接到端口2195、2196等时,我做错什么了吗?
2) Is GCDAsyncUdpSocket reliable? 2)GCDAsyncUdpSocket是否可靠? Whatever I try with it, it passes.
无论我尝试什么,它都会过去。
You have several misconceptions here: 您在这里有一些误解:
See this about detecting if an UDP port is open or not. 有关检测UDP端口是否打开的信息, 请参见此内容。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.