Ports: Difference between revisions
Mr. MacKenty (talk | contribs) |
Mr. MacKenty (talk | contribs) |
||
Line 24: | Line 24: | ||
There can only be one listener socket for a given address/port combination.<ref>https://stackoverflow.com/questions/152457/what-is-the-difference-between-a-port-and-a-socket</ref> | There can only be one listener socket for a given address/port combination.<ref>https://stackoverflow.com/questions/152457/what-is-the-difference-between-a-port-and-a-socket</ref> | ||
=== Video === | |||
This video is perfect to give you a very basic idea of sockets: | |||
<html> | |||
<iframe width="560" height="315" src="https://www.youtube.com/embed/oWE6-z7IFyE" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe> | |||
</html> | |||
== References == | == References == |
Latest revision as of 20:53, 1 March 2020
In computer networking, a port is a communication endpoint. At the software level, within an operating system, a port is a logical construct that identifies a specific process or a type of network service. Ports are identified for each protocol and address combination by 16-bit unsigned numbers, commonly known as the port number. The most common protocols that use port numbers are the Transmission Control Protocol (TCP) and the User Datagram Protocol (UDP).[2]
I like the analogy that an IP address is like an address to a big apartment building, and a port is the address of a specific apartment within the building.
Video[edit]
Sockets[edit]
A network socket is an internal endpoint for sending or receiving data within a node on a computer network.[3]
A TCP socket is an endpoint instance defined by an IP address and a port in the context of either a particular TCP connection or the listening state.
A port is a virtualisation identifier defining a service endpoint (as distinct from a service instance endpoint aka session identifier).
A TCP socket is not a connection, it is the endpoint of a specific connection.
There can be concurrent connections to a service endpoint, because a connection is identified by both its local and remote endpoints, allowing traffic to be routed to a specific service instance.
There can only be one listener socket for a given address/port combination.[4]
Video[edit]
This video is perfect to give you a very basic idea of sockets: