Ports: Difference between revisions

From Computer Science Wiki
(Created page with "right|frame|This page is linked to networks and networking. <ref>http://www.flaticon.com/</ref> In computer networking, a port is a communication endpoin...")
 
No edit summary
Line 10: Line 10:
<iframe width="560" height="315" src="https://www.youtube.com/embed/uMwzsh_Dd9Y" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
<iframe width="560" height="315" src="https://www.youtube.com/embed/uMwzsh_Dd9Y" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
</html>
</html>
== Sockets ==
Summary
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.<ref>https://stackoverflow.com/questions/152457/what-is-the-difference-between-a-port-and-a-socket</ref>


== References ==
== References ==

Revision as of 21:28, 1 March 2020

This page is linked to networks and networking. [1]

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]

Summary 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.[3]

References[edit]