Basics of networking
First things first, let's cover a term that is pretty much synonymous with networking at this point: sockets. What is a socket? In its simplest terms, a socket is just an interface that is used for network communications. When two applications are communicating, at least two sockets are involved and data is exchanged between them. When data is sent from application A to application B, it first leaves from the socket of application A, travels throughout the internet, and hopefully reaches the socket of application B:
Each socket has to be bound to something referred to as a port, which can be imagined as a gateway to a system. Each gateway is used for different purposes and can only be used by one socket at a time. In the simplest terms, a port is just a 16-bit numerical value, which means a port number can be as high as 65535. While a service is using a specific port, another socket cannot bind to it until it's freed. The most commonly used ports are in a...