HTTPS和TCP的关系

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/i042416/article/details/88423780

看stackoverflow上的这个讨论:
https://serverfault.com/questions/98951/does-https-use-tcp-or-udp

HTTPS到底是基于TCP还是UDP?
clipboard1

获得38个赞的答案:

HTTPS can run over any reliable stream transport protocol. Normally that’s TCP, but it could also be SCTP. It is NOT expected to run over UDP, which is an unreliable datagram protocol (in fact, while that’s not its official name, that’s a good way to remember what it is).
The IANA assignment for UDP is historical; at the time, nearly every protocol was assigned both the TCP and UDP port numbers, even if it was expected that it would only ever use one. There has been discussion of merging the port number registries, and only ever assigning one port to one protocol from here on. That is to make it easier to deploy future transport protocols that would otherwise need their own registries. I’m not aware of how that discussion concluded.
HTTPS可以使用任何可靠的stream transport,即流传输协议。通常是TCP,也可以是SCTP。

Most SSL implementations expose it as SSL socket, so it implies TCP.

大多数SSL的实现将其通过SSL套接字暴露,因此基于TCP。

clipboard2

在windows电脑,查看目录C:\Windows\System32\drivers\etc下的services文件,能知道每个服务对应是用TCP还是UDP实现的:

clipboard3

要获取更多Jerry的原创文章,请关注公众号"汪子熙":

猜你喜欢

转载自blog.csdn.net/i042416/article/details/88423780