Ads Here

Sunday, January 28, 2018

TCP Services

TCP Services

Services offered by TCP to the process at the application layer.

Process-to-Process Communication.

TCP provides process-to-process communication using port numbers.

Stream Delivery Service

TCP allows the sending process to deliver data as a stream of bytes and allows the receiving process to obtain data as a stream of bytes. 

TCP creates an environment in which the two processes seem to be connected by an imaginary tube that carries their bytes across the Internet. 

The sending process produces the stream of bytes and the receiving process consumes them. 


The sending and receiving process may not write or read data at the same rate,

TCP needs buffer for storge. There are two buffers, the sending buffer and receiving buffer, one for each direction.

The buffer is implemented in circular array of 1-byte locations, normally the buffers are hundreds or thousands of bytes, depending on the implementation.

TCP groups a number of bytes together into a packet called a segment and adds a header to each segment and delivers the segment to the IP layer for transmission. 

Sending and Receiving Buffers

TCP Segment

Full-Duplex Communication

TCP offers full-duplex service, where data can flow in both directions at the same time. Each TCP endpoint then has its own sending and receiving buffer, and segments move in both directions.

Multiplexing and Demultiplexing

Like UDP, TCP performs multiplexing at the sender and demultiplexing at the receiver. However, since TCP is a connection-oriented protocol, a connection needs to be established for each pair of processes.

Connection-Oriented Service

TCP, unlike UDP, is a connection-oriented protocol. 

A process at site A wants to send to and receive data from another process at site B, the following three phases occur:

1. The two TCPs establish a virtual connection between them.
2. Data are exchanged in both directions.
3. The connection is terminated.

Reliable Service

TCP is a reliable transport protocol. It uses an acknowledgment mechanism to check the safe and sound arrival of data.

No comments:

Post a Comment