‫The transmission control protocol TCP provides a communication service at an intermediate level between
‫an application program and the internet protocol.
‫It provides host to host connectivity at the transport layer of the internet model.
‫DCP works with the Internet Protocol IP, which defines how computers send packets of data to each other.
‫Together, TCP and IP are basic rules defining the internet.
‫TCP is a connection oriented protocol, which means a connection is establish and maintain until the
‫application programs at each end have finished exchanging messages.
‫It determines how to fragment application data into packets that networks can deliver, sends packets
‫to and accepts packets from the network layer.
‫Manages flow control, and because it is meant to provide error free data transmission, handles retransmission
‫of dropped or garbled packets, as well as acknowledgement of all packets that arrive.
‫Let's see the connection oriented, error free communication of TCP and an example when a web server
‫sends an HTML file to a client.
‫It uses the HTTP protocol to do so.
‫The CDP program layer asks the TCP layer to set up the connection and send the file.
‫The TCP stack divides the file into packets, numbers them and then forwards them individually to the
‫IP layer for delivery.
‫Although each packet in the transmission will have the same source and destination IP addresses, packets
‫may be sent along multiple routes.
‫The TCP program layer in the client computer waits until all of the packets have arrived, then acknowledges
‫those it receives and asks for the retransmission on any it does not based on missing packet numbers,
‫then assembled him into a file and delivers the file to the receiving application.
‫The TCP Three-Way handshake is a method used by TCP to set up a connection.
‫He three three-way handshaking technique is often referred to as Sin Sinek Ach.
‫Because there are three messages transmitted by TCP to negotiate and started TCP session between two
‫computers.
‫This three way handshake process is also designed so that both ends can initiate and negotiate separate
‫TCP socket connections at the same time.
‫That means the connection is full duplex.
‫You know what?
‫We have to take a break at this point and talk about TCP flags.
‫There are one bit flags in TCP headers, which are called TCP flags, TCP flags are used within TCP
‫packet transfers to indicate a particular connection state or provide additional information.
‫Ignoring easy CW, R and an s flags for now, they're basically Six TCP flags.
‫The in or synchronization flag is used as a first step in establishing a three way handshake between
‫two hosts.
‫Only the first packet from both the sender and the receiver should have this flag set.
‫The act flag, which stands for acknowledgement, is used to acknowledge the successful receipt of a
‫packet.
‫The rest flag, which stands for Reset, get sent from receiver to the sender when a packet is sent
‫to a particular host.
‫That was not expecting it.
‫The Finn flag, which stands for finished means there is no more data from the sender.
‫Therefore, it is used in the last packet sent from the sender.
‫The peace flag, which stands for Bush, is somewhat similar to the U.S. flag and tells a receiver to
‫process these packets as they are received instead of buffering them.
‫The ARE flag is used to notify the receiver to process the urgent packets before processing all other
‫packets.
‫OK, now we can continue to talk about TCP is three way handshake.
‫Step one.
‫Computer sends a send data packet to Computer B.
‫Send data back, it means the data packet where the sin flag of the TCP header is set.
‫Well, what does setting the scene flag mean?
‫That means making the send bit one.
‫The objective of this package is to ask if computer be is open for new connections.
‫Computer B must have opened ports that can accept and initiate new connections.
‫Step two, when Computer B receives a signed packet from Computer A, it responds and returns a confirmation
‫receipt.
‫The snack packet.
‫As you understand, since backpack, it means the packet in which the sin and AG flags are set.
‫Step three.
‫Computer receives the Sinek from Computer B and responds with an act packet.
‫At this point, both computers have received an acknowledgement of the connection with these, a full
‫duplex communication is established.
‫UDP is another protocol of transport layer layer four used primarily for establishing low latency and
‫loss tolerating connections between applications on the internet.
‫TCP has emerged as a dominant protocol used for the bulk of internet connectivity owing to its services
‫for breaking large data sets into individual packet, checking for and resetting lost packets and reassembling
‫packets into the correct sequence.
‫But these additional services come at a cost in terms of additional data overhead and delays called
‫latency.
‫In contrast, UDP just sends the packets, which means that it has a much lower bandwidth overhead and
‫latency.
‫But packets can be lost or received out of order as a result, owing to the different paths individual
‫packets traverse between center and receiver.
‫So UDP uses a simple connection less communication model with a minimum of protocol mechanism.
‫It has no handshaking dialogues and thus exposes the user's program to any unreliability of the underlying
‫network.
‫There is no guarantee of delivery ordering or duplicate protection.
‫UDP is suitable for purposes where error checking and correction are either not necessary or are performed
‫in the application.
‫UDP is an ideal protocol for network applications in which perceived latency is critical, such as gaming,
‫voice and video communications, which can suffer some data loss without adversely affecting perceived
‫quality.
‫In addition, since its transaction oriented suitable for simple query response protocols such as the
‫domain name system or the network time protocol.