Why are chat apps implemented using socket communication?

Photo by Connor Olson on Unsplash

1. Basic Concepts of Communication

Photo by Markus Spiske on Unsplash

TCP (Transmission Control Protocol) is a standard that defines how to establish and maintain a network conversation through which application programs can exchange data.

The Internet Protocol (IP) is the principal communications protocol in the Internet protocol suite for relaying datagrams across network boundaries. Its routing function enables internetworking, and essentially establishes the Internet.

TCP defines how applications can create communication channels across a network. IP defines the way each packet is addressed and routed to ensure it reaches the correct destination (EDUCABA).

2. What is a Socket communication?

Photo by israel palacio on Unsplash

HTTP is a protocol which allows the fetching of resources, such as HTML documents. It is the foundation of any data exchange on the Web and it is a client-server protocol, which means requests are initiated by the recipient, usually the Web browser

MDN <An overview of HTTP>

A socket is one endpoint of a two-way communication link between two programs running on the network. A socket is bound to a port number so that the TCP layer can identify the application that data is destined to be sent to.

<MDN — Connection management in HTTP/1.x>

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store