TCPIP (TRANSMISSION CONTROL PROTOCOL) Reliable Transport Service:
In this, we’ll learn about transport protocols, especially TCP, which is the most important one used on the Internet. TCP is special because it gives us reliable data delivery, even though the Internet itself is not reliable.
Here’s what’s amazing: the Internet (through IP) sometimes loses data, delivers it late, duplicates it, or mixes up the order. But TCP still manages to deliver everything correctly to the apps that need it. It does this by using smart techniques — and it does all this without putting too much pressure on the network.
The chapter will explain both what TCP offers to applications and how it works behind the scenes to make sure everything runs smoothly.
The Transmission Control Protocol:
Programmers are trained to think that reliability is fundamental in a computer system. For example, when writing an application that sends data to an I/O device such as a printer, a programmer assumes the data will arrive currently or the operating system. Will send an error message to the application. That is, a programmer assumes the underlying system guarantees that data will be delivered reliably.
To allow programmers to follow conventional techniques when creating applications that communicate across the internet, protocol software must provide the same semantics as a conventional computer system: the software must guarantee prompt and reliable communication, data must be delivered exactly in the order it was sent, with no loss and no duplication. This ensures that the receiving application gets the correct and complete message, just as the sender intended.
The service TCP provides To Applications:
TCP’s services come with seven main features.
- Connection orientation.
- Point –To-point communication
- Complete Reliability
- Full Duplex communication
- Stream Interface
- Reliable connection startup
- Graceful connection shutdown
ESTABLISHING CLIENT – SERVER COMMUNICATION USING SOCKET PROGRAMMING FOR TCP/IPV4 PROTOCOL:
The basic algorithm for the server can be summarized below:
- A Socket needs to be created which acts as an interface between the application program and the communication network. The communication is bi-directional, reliable, error-free, and no message boundaries are kept.
- A Socket is created without a name. The name of a socket is nothing but the socket address. Before a name is associated with a socket, client processes cannot identify the server because they only have the server’s IP and port number.
- Once the socket is bound to the network, the server will be listening to the client’s requests.
- If the client sends requests, the server needs to accept it.
- Once the connection is established, two-way communication can be achieved i.e. messages can be received or sent from or to the client.
The basic algorithm for clients can be summarized below:
- Just like the server, the client also needs a socket interface that needs to be bound to the network i.e. steps 1 and 2 remain the same in the client also.
- Once the socket is bound to the network, the client needs to get connected to the server.
Once the server accepts the client request two communications can be achieved i.e. messages can be sent or received to or from the server.
Conclusion:
The Indian Institute of Embedded Systems (IIES) is a renowned institution that offers top-notch education and training in the field of embedded systems. With its comprehensive curriculum and experienced faculty, IIES is a leading choice for individuals aspiring to excel in this domain.