java 网络中的端口是什么?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5378406/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
What are ports in networking?
提问by Suhail Gupta
I am studying Networking in java.I am not clear about what are ports. Also i need to know about what is a socket?
我正在用 java 学习网络。我不清楚什么是端口。我还需要知道什么是套接字?
Please explain it well.
请解释清楚。
采纳答案by sgokhales
PORTS :
端口:
In computer networking, the term port can refer to either physical or virtual connection points.
在计算机网络中,术语端口可以指物理或虚拟连接点。
Physical network ports allow connecting cables to computers, routers, modems and other peripheral devices.
Virtual ports are part of TCP/IP networking. These ports allow software applications to share hardware resources without interfering with each other. Computers and routers automatically manage network traffic traveling via their virtual ports. Network firewalls additionally provide some control over the flow of traffic on each virtual port for security purposes.
物理网络端口允许将电缆连接到计算机、路由器、调制解调器和其他外围设备。
虚拟端口是 TCP/IP 网络的一部分。这些端口允许软件应用程序在互不干扰的情况下共享硬件资源。计算机和路由器自动管理通过其虚拟端口传输的网络流量。出于安全目的,网络防火墙还对每个虚拟端口上的流量提供了一些控制。
SOCKET :
插座 :
A socket represents a single connection between two network applications. A socket is one end-point of a two-way communication link between two programs running on the network
套接字代表两个网络应用程序之间的单个连接。套接字是网络上运行的两个程序之间双向通信链路的一个端点
A good read :
一个很好的阅读:
Since you are new to networking, you must visit this link.
由于您是网络新手,您必须访问此链接。