Monday 29 July 2019

Difference between TCP and UDP

                   In this post, we will see difference between TCP and UDP.
                  Go through the following.













Sr. No. TCP UDP
1.It is connection oriented protocol.
This means connection has to be established between client and server before communication. 
It is connection less protocol. This means, there is no requirement of connection to be established between client and server.
2. Sender can request acknowledgement from receiver and can re-transmit data if failure happens. No acknowledgements can be requested.
3. It is reliable as sender is knowing the status of data whether it is reached to receiver or not. It is unreliable as there is no acknowledgement.
4. It is slower. It is faster.
5. TCP header size is 20 bytes. UDP header size is 8 bytes.
  
TCP Client Server Program in Java (Socket Programming)
https://www.comrevo.com/2019/07/tcp-client-server-program-in-java-socket-programming.html

UDP Client Server Program in Java (Socket Programming)
https://www.comrevo.com/2019/07/udp-client-server-program-in-java-socket-programming.html

Client Server chat program (application) in Java using Socket Programming 
https://www.comrevo.com/2019/07/client-server-chat-program-application-in-java-using-socket-programming.html

No comments:

Post a Comment