为什么在使用保留端口时套接字编程有效?

huangapple go评论62阅读模式
英文:

Why sockets programming work when we use a reserved port?

问题

为什么在Java套接字中使用保留端口时,它在本地主机上工作?

ServerSocket ss = new ServerSocket(443);

这个端口属于保留端口范围(0~1023),但它可以正常工作,没有任何问题!!

英文:

Why when we use a reserved port in java socket its work on the localhost?

ServerSocket ss = new ServerSocket(443);

This port from reserved ports (0~1023),but its work without any problem !!

答案1

得分: 1

你可以使用该端口,因为该保留端口未被用于其他任何目的。

英文:

You can use that port since that reserved port is not in use for any other purpose.

huangapple
  • 本文由 发表于 2020年10月17日 19:12:57
  • 转载请务必保留本文链接:https://go.coder-hub.com/64401808.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定