httpclient使用什么端口?
httpclient使用什么端口?
80、8080、……?
What port does httpclient use?
80, 8080, ....?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
httpclient使用什么端口?
80、8080、……?
What port does httpclient use?
80, 8080, ....?
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(3)
连接中始终涉及两个端口 - 一个在服务器上,另一个在客户端上。
服务器端端口通过 HTTP URL(HTTP 连接的默认值为 80,HTTPS 的默认值为 443),并在主机名后使用主机名:端口表示法指定。
在客户端,事情有点有趣。客户端打开一个临时或动态端口,该端口仅在建立连接时持续有效。客户端端口始终在IANA 为其保留的动态范围(49152 到 65535),通常在较新的操作系统上强制执行(我不确定 Windows XP 是否严格遵循 IANA 指令,但 Vista 和 Windows Server 2008 恰好)。
There are always two ports involved in a connection - one at the server, and another at the client.
The server-side port is specified (and is known to the client) via the HTTP URL (the default is 80 for HTTP connections and 443 for HTTPS) and is specified after the hostname using hostname:port notation.
On the client-side, things are a bit more interesting. Clients open a temporary or dynamic port that lasts only as long as the connection is made. Client-side ports are always opened on the dynamic range (49152 through 65535) reserved for them by IANA, which is usually enforced on the newer operating systems (I'm not sure if Windows XP follows the IANA directive to the letter, but Vista and Windows Server 2008 happen to).
如果您指的是目标端口,则非安全 (HTTP) 协议的标准是 80,而标准 HTTPS 端口是 443。
就出站客户端端口而言,这在很大程度上无关紧要,将根据可用端口进行选择等(即:没有设置出站端口。)
If you mean the destination port, the standard for the non-secure (HTTP) protocol is 80, whereas the standard HTTPS port is 443.
In terms of the outbound client port, that's largely irrelevant and will be chosen based on what ports are available, etc. (i.e.: There's no set outbound port.)
标准端口是 80。如果您看到类似 http://example.com:8080 的内容,则表示站点使用不同的端口,在本例中为 8080。
The standard port is 80. If you see something like http://example.com:8080, it means the site is using a different port, in this case 8080.