Ports: Difference between revisions
Mr. MacKenty (talk | contribs) |
Mr. MacKenty (talk | contribs) |
||
Line 12: | Line 12: | ||
== Sockets == | == Sockets == | ||
A network socket is an internal endpoint for sending or receiving data within a node on a computer network.<ref>https://en.wikipedia.org/wiki/Network_socket</ref> | |||
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 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. |
Revision as of 20:29, 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]